public void onMessagesRead ( Peer peer , long fromDate ) { // Filtering obsolete read events if ( fromDate < getLastReadDate ( peer ) ) { return ; } // Removing read messages from pending storage getNotifications ( ) . clear ( ) ; pendingStorage . setMessagesCount ( 0 ) ; pendingStorage . setDialogsCount ( 0 ) ; allPendingNotifications . clear ( ) ; saveStorage ( ) ; updateNotification ( ) ; // Setting last read date setLastReadDate ( peer , fromDate ) ; }
Processing event about messages read