From b99d31ca61f397794251058a415551dac36d23ee Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Tue, 8 Oct 2019 08:42:15 +0200 Subject: [PATCH] MOBILE-2491 filter: Use instanceid 0 for system context --- src/addon/blog/components/entries/entries.ts | 2 +- .../components/discussions/addon-messages-discussions.html | 4 ++-- src/addon/messages/components/discussions/discussions.ts | 2 -- .../messages/pages/conversation-info/conversation-info.html | 4 ++-- .../messages/pages/conversation-info/conversation-info.ts | 2 -- src/addon/messages/pages/discussion/discussion.html | 4 ++-- src/addon/messages/pages/discussion/discussion.ts | 2 -- .../pages/group-conversations/group-conversations.html | 6 +++--- .../pages/group-conversations/group-conversations.ts | 2 -- src/addon/messages/pages/search/search.html | 2 +- src/addon/messages/pages/search/search.ts | 3 --- src/addon/messages/providers/mainmenu-handler.ts | 3 +-- src/addon/notifications/pages/list/list.html | 2 +- src/addon/notifications/pages/list/list.ts | 3 --- src/components/site-picker/site-picker.ts | 2 +- src/core/contentlinks/pages/choose-site/choose-site.html | 2 +- src/core/courses/pages/dashboard/dashboard.html | 2 +- src/core/courses/pages/dashboard/dashboard.ts | 2 -- src/core/filter/providers/filter.ts | 5 +++-- src/core/filter/providers/helper.ts | 4 ++-- src/core/login/pages/sites/sites.html | 2 +- src/core/login/pages/sites/sites.ts | 2 +- src/core/mainmenu/pages/more/more.html | 2 +- src/core/mainmenu/pages/more/more.ts | 2 -- src/core/pushnotifications/providers/pushnotifications.ts | 2 +- src/core/settings/pages/space-usage/space-usage.html | 2 +- src/core/settings/pages/space-usage/space-usage.ts | 2 +- .../settings/pages/synchronization/synchronization.html | 2 +- src/core/sharedfiles/pages/choose-site/choose-site.html | 2 +- 29 files changed, 29 insertions(+), 47 deletions(-) diff --git a/src/addon/blog/components/entries/entries.ts b/src/addon/blog/components/entries/entries.ts index 29b225c09..8853d8842 100644 --- a/src/addon/blog/components/entries/entries.ts +++ b/src/addon/blog/components/entries/entries.ts @@ -104,7 +104,7 @@ export class AddonBlogEntriesComponent implements OnInit { this.contextInstanceId = this.courseId; } else { this.contextLevel = 'system'; - this.contextInstanceId = this.siteHomeId; + this.contextInstanceId = 0; } this.commentsEnabled = !this.commentsProvider.areCommentsDisabledInSite(); diff --git a/src/addon/messages/components/discussions/addon-messages-discussions.html b/src/addon/messages/components/discussions/addon-messages-discussions.html index 8d21aaba8..0094d0dc5 100644 --- a/src/addon/messages/components/discussions/addon-messages-discussions.html +++ b/src/addon/messages/components/discussions/addon-messages-discussions.html @@ -15,7 +15,7 @@

{{ result.fullname }}

-

+

@@ -27,7 +27,7 @@ {{discussion.message.timecreated / 1000 | coreDateDayOrTime}} -

+

diff --git a/src/addon/messages/components/discussions/discussions.ts b/src/addon/messages/components/discussions/discussions.ts index 0a37c5ec3..629446b1a 100644 --- a/src/addon/messages/components/discussions/discussions.ts +++ b/src/addon/messages/components/discussions/discussions.ts @@ -50,7 +50,6 @@ export class AddonMessagesDiscussionsComponent implements OnDestroy { loading: '', text: '' }; - siteHomeId: number; constructor(private eventsProvider: CoreEventsProvider, sitesProvider: CoreSitesProvider, translate: TranslateService, private messagesProvider: AddonMessagesProvider, private domUtils: CoreDomUtilsProvider, navParams: NavParams, @@ -60,7 +59,6 @@ export class AddonMessagesDiscussionsComponent implements OnDestroy { this.search.loading = translate.instant('core.searching'); this.loadingMessages = translate.instant('core.loading'); this.siteId = sitesProvider.getCurrentSiteId(); - this.siteHomeId = sitesProvider.getCurrentSiteHomeId(); // Update discussions when new message is received. this.newMessagesObserver = eventsProvider.on(AddonMessagesProvider.NEW_MESSAGE_EVENT, (data) => { diff --git a/src/addon/messages/pages/conversation-info/conversation-info.html b/src/addon/messages/pages/conversation-info/conversation-info.html index 66dd220f2..b5885ddd1 100644 --- a/src/addon/messages/pages/conversation-info/conversation-info.html +++ b/src/addon/messages/pages/conversation-info/conversation-info.html @@ -18,8 +18,8 @@
-

-

+

+

{{ 'addon.messages.numparticipants' | translate:{$a: conversation.membercount} }}

diff --git a/src/addon/messages/pages/conversation-info/conversation-info.ts b/src/addon/messages/pages/conversation-info/conversation-info.ts index dcd2597dd..5dfeb450d 100644 --- a/src/addon/messages/pages/conversation-info/conversation-info.ts +++ b/src/addon/messages/pages/conversation-info/conversation-info.ts @@ -35,14 +35,12 @@ export class AddonMessagesConversationInfoPage implements OnInit { members: AddonMessagesConversationMember[] = []; canLoadMore = false; loadMoreError = false; - siteHomeId: number; protected conversationId: number; constructor(private messagesProvider: AddonMessagesProvider, private domUtils: CoreDomUtilsProvider, navParams: NavParams, protected viewCtrl: ViewController, sitesProvider: CoreSitesProvider) { this.conversationId = navParams.get('conversationId'); - this.siteHomeId = sitesProvider.getCurrentSiteHomeId(); } /** diff --git a/src/addon/messages/pages/discussion/discussion.html b/src/addon/messages/pages/discussion/discussion.html index 5c7ea16ad..a869dad74 100644 --- a/src/addon/messages/pages/discussion/discussion.html +++ b/src/addon/messages/pages/discussion/discussion.html @@ -3,7 +3,7 @@ - + @@ -58,7 +58,7 @@

- +