Don't assume that widget IDs are unique (#8052)
* Don't assume that widget IDs are unique Signed-off-by: Robin Townsend <robin@robin.town> * Don't remove live tiles that don't exist Signed-off-by: Robin Townsend <robin@robin.town> * Add unit test for AppTile's live tile tracking Signed-off-by: Robin Townsend <robin@robin.town>
This commit is contained in:
parent
bc8fdac491
commit
744eeb53fe
13 changed files with 276 additions and 159 deletions
|
@ -508,6 +508,14 @@ export default class WidgetUtils {
|
|||
return app?.data?.title?.trim() || "";
|
||||
}
|
||||
|
||||
static getWidgetUid(app?: IApp): string {
|
||||
return app ? WidgetUtils.calcWidgetUid(app.id, app.roomId) : "";
|
||||
}
|
||||
|
||||
static calcWidgetUid(widgetId: string, roomId?: string): string {
|
||||
return roomId ? `room_${roomId}_${widgetId}` : `user_${widgetId}`;
|
||||
}
|
||||
|
||||
static editWidget(room: Room, app: IApp): void {
|
||||
// TODO: Open the right manager for the widget
|
||||
if (SettingsStore.getValue("feature_many_integration_managers")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue