From 2e96a61955e525bf6269e41342bf3ffce05805a6 Mon Sep 17 00:00:00 2001 From: Vijay Aravamudhan Date: Fri, 24 Sep 2021 07:39:41 +0530 Subject: Allow services to delineate favorites vs non-favorites in unread counts (#1979) implements getferdi/recipes#721 (eg: office365-owa) --- src/models/Service.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/models/Service.js') diff --git a/src/models/Service.js b/src/models/Service.js index cc001f98d..75dfde027 100644 --- a/src/models/Service.js +++ b/src/models/Service.js @@ -83,6 +83,8 @@ export default class Service { @observable isHibernationRequested = false; + @observable onlyShowFavoritesInUnreadCount = false; + @observable lastUsed = Date.now(); // timestamp @observable lastHibernated = null; // timestamp @@ -144,6 +146,10 @@ export default class Service { data.hasCustomIcon, this.hasCustomUploadedIcon, ); + this.onlyShowFavoritesInUnreadCount = ifUndefinedBoolean( + data.onlyShowFavoritesInUnreadCount, + this.onlyShowFavoritesInUnreadCount, + ); this.proxy = ifUndefinedString(data.proxy, this.proxy); this.spellcheckerLanguage = ifUndefinedString( data.spellcheckerLanguage, @@ -191,6 +197,7 @@ export default class Service { team: this.team, url: this.url, hasCustomIcon: this.hasCustomIcon, + onlyShowFavoritesInUnreadCount: this.onlyShowFavoritesInUnreadCount, }; } -- cgit v1.2.3-70-g09d2