You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-07 10:46:24 +03:00
move favicon reset stuff here where its more general
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -17,6 +17,8 @@ See the License for the specific language governing permissions and
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import dis from 'dispatcher';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class for classes that provide platform-specific functionality
|
* Base class for classes that provide platform-specific functionality
|
||||||
* eg. Setting an application badge or displaying notifications
|
* eg. Setting an application badge or displaying notifications
|
||||||
@@ -27,6 +29,16 @@ export default class BasePlatform {
|
|||||||
constructor() {
|
constructor() {
|
||||||
this.notificationCount = 0;
|
this.notificationCount = 0;
|
||||||
this.errorDidOccur = false;
|
this.errorDidOccur = false;
|
||||||
|
|
||||||
|
dis.register(this._onAction.bind(this));
|
||||||
|
}
|
||||||
|
|
||||||
|
_onAction(payload: Object) {
|
||||||
|
switch (payload.action) {
|
||||||
|
case 'on_logged_out':
|
||||||
|
this.setNotificationCount(0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Used primarily for Analytics
|
// Used primarily for Analytics
|
||||||
|
|||||||
Reference in New Issue
Block a user