@ -86,21 +86,19 @@ public class TypingStatusSender {
ThreadDatabase threadDatabase = DatabaseFactory . getThreadDatabase ( context ) ;
Recipient originalRecipient = threadDatabase . getRecipientForThreadId ( threadId ) ;
// Send normal message if storage api wasn't found
if ( storageAPI = = null | | originalRecipient = = null ) {
if ( originalRecipient = = null ) {
ApplicationContext . getInstance ( context ) . getJobManager ( ) . add ( new TypingSendJob ( threadId , typingStarted ) ) ;
return ;
}
MultiDeviceUtilKt . getAllDevices ( context , originalRecipient . getAddress ( ) . serialize ( ) , storageAPI , ( devicePub Key, isFriend , friendCount ) - > {
Recipient device = Recipient . from ( context , Address . fromSerialized ( devicePub Key) , false ) ;
long deviceThreadI d = threadDatabase . getThreadIdIfExistsFor ( device ) ;
if ( deviceThreadI d > - 1 ) {
ApplicationContext . getInstance ( context ) . getJobManager ( ) . add ( new TypingSendJob ( deviceThreadI d , typingStarted ) ) ;
MultiDeviceUtilKt . getAllDevices ( context , originalRecipient . getAddress ( ) . serialize ( ) , storageAPI , ( devicePub lic Key, isFriend , friendCount ) - > {
Recipient device = Recipient . from ( context , Address . fromSerialized ( devicePub lic Key) , false ) ;
long deviceThreadI D = threadDatabase . getThreadIdIfExistsFor ( device ) ;
if ( deviceThreadI D > - 1 ) {
ApplicationContext . getInstance ( context ) . getJobManager ( ) . add ( new TypingSendJob ( deviceThreadI D , typingStarted ) ) ;
}
return Unit . INSTANCE ;
} ) ;
}
private class StartRunnable implements Runnable {