mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-24 10:32:46 +02:00
Send Stickers: WidgetManager: add userWidgets
and show them in the widget picker and within the list of installed widgets of the integration manager #1860
This commit is contained in:
@@ -53,12 +53,19 @@
|
||||
|
||||
MXRoom *room = [mxSession roomWithRoomId:roomId];
|
||||
|
||||
NSArray<Widget*> *widgets = [[WidgetManager sharedManager] widgetsNotOfTypes:@[kWidgetTypeJitsi]
|
||||
NSArray<Widget*> *roomWidgets = [[WidgetManager sharedManager] widgetsNotOfTypes:@[kWidgetTypeJitsi]
|
||||
inRoom:room];
|
||||
|
||||
NSArray<Widget*> *userWidgets = [[WidgetManager sharedManager] userWidgets:room.mxSession];
|
||||
|
||||
NSMutableArray<Widget*> *widgets = [NSMutableArray array];
|
||||
[widgets addObjectsFromArray:roomWidgets];
|
||||
[widgets addObjectsFromArray:userWidgets];
|
||||
|
||||
// List widgets
|
||||
for (Widget *widget in widgets)
|
||||
{
|
||||
alertAction = [UIAlertAction actionWithTitle:widget.name
|
||||
alertAction = [UIAlertAction actionWithTitle:widget.name ? widget.name : widget.type
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * _Nonnull action)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user