@@ -18,7 +18,6 @@ limitations under the License.
1818*/
1919
2020import VectorBasePlatform from './VectorBasePlatform' ;
21- import Favico from 'favico.js' ;
2221import request from 'browser-request' ;
2322import dis from 'matrix-react-sdk/lib/dispatcher.js' ;
2423import q from 'q' ;
@@ -27,49 +26,6 @@ import url from 'url';
2726import UAParser from 'ua-parser-js' ;
2827
2928export default class WebPlatform extends VectorBasePlatform {
30- constructor ( ) {
31- super ( ) ;
32- this . runningVersion = null ;
33- // The 'animations' are really low framerate and look terrible.
34- // Also it re-starts the animationb every time you set the badge,
35- // and we set the state each time, even if the value hasn't changed,
36- // so we'd need to fix that if enabling the animation.
37- this . favicon = new Favico ( { animation : 'none' } ) ;
38- this . _updateFavicon ( ) ;
39- }
40-
41- _updateFavicon ( ) {
42- try {
43- // This needs to be in in a try block as it will throw
44- // if there are more than 100 badge count changes in
45- // its internal queue
46- let bgColor = "#d00" ,
47- notif = this . notificationCount ;
48-
49- if ( this . errorDidOccur ) {
50- notif = notif || "×" ;
51- bgColor = "#f00" ;
52- }
53-
54- this . favicon . badge ( notif , {
55- bgColor : bgColor ,
56- } ) ;
57- } catch ( e ) {
58- console . warn ( `Failed to set badge count: ${ e . message } ` ) ;
59- }
60- }
61-
62- setNotificationCount ( count : number ) {
63- if ( this . notificationCount === count ) return ;
64- super . setNotificationCount ( count ) ;
65- this . _updateFavicon ( ) ;
66- }
67-
68- setErrorStatus ( errorDidOccur : boolean ) {
69- if ( this . errorDidOccur === errorDidOccur ) return ;
70- super . setErrorStatus ( errorDidOccur ) ;
71- this . _updateFavicon ( ) ;
72- }
7329
7430 /**
7531 * Returns true if the platform supports displaying
0 commit comments