Merge branch 'dev' of https://github.com/loki-project/session-android into background-polling

This commit is contained in:
Anton Chekulaev 2020-09-24 14:49:21 +10:00
commit f679813b68
5 changed files with 6 additions and 4 deletions

View File

@ -182,7 +182,7 @@ dependencies {
testImplementation 'org.robolectric:shadows-multidex:4.2' testImplementation 'org.robolectric:shadows-multidex:4.2'
} }
def canonicalVersionCode = 98 def canonicalVersionCode = 99
def canonicalVersionName = "1.5.4" def canonicalVersionName = "1.5.4"
def postFixSize = 10 def postFixSize = 10

View File

@ -216,7 +216,9 @@ public class ApplicationContext extends MultiDexApplication implements Dependenc
resubmitProfilePictureIfNeeded(); resubmitProfilePictureIfNeeded();
publicChatManager = new PublicChatManager(this); publicChatManager = new PublicChatManager(this);
updateOpenGroupProfilePicturesIfNeeded(); updateOpenGroupProfilePicturesIfNeeded();
registerForFCMIfNeeded(false); if (userPublicKey != null) {
registerForFCMIfNeeded(false);
}
// Set application UI mode (day/night theme) to the user selected one. // Set application UI mode (day/night theme) to the user selected one.
UiModeUtilities.setupUiModeToUserSelected(this); UiModeUtilities.setupUiModeToUserSelected(this);
// ======== // ========

View File

@ -914,7 +914,7 @@ public class MmsDatabase extends MessagingDatabase {
type |= Types.EXPIRATION_TIMER_UPDATE_BIT; type |= Types.EXPIRATION_TIMER_UPDATE_BIT;
} }
return insertMessageInbox(retrieved, "", threadId, type, 0); return insertMessageInbox(retrieved, "", threadId, type, serverTimestamp);
} }
public Optional<InsertResult> insertSecureDecryptedMessageInbox(IncomingMediaMessage retrieved, long threadId) public Optional<InsertResult> insertSecureDecryptedMessageInbox(IncomingMediaMessage retrieved, long threadId)

View File

@ -172,6 +172,7 @@ class HomeActivity : PassphraseRequiredActionBarActivity, ConversationClickListe
SessionManagementProtocol.configureIfNeeded(sessionResetImpl, sskDatabase, application) SessionManagementProtocol.configureIfNeeded(sessionResetImpl, sskDatabase, application)
MultiDeviceProtocol.configureIfNeeded(apiDB) MultiDeviceProtocol.configureIfNeeded(apiDB)
IP2Country.configureIfNeeded(this) IP2Country.configureIfNeeded(this)
application.registerForFCMIfNeeded(false)
// Preload device links to make message sending quicker // Preload device links to make message sending quicker
val publicKeys = ContactUtilities.getAllContacts(this).filter { contact -> val publicKeys = ContactUtilities.getAllContacts(this).filter { contact ->
!contact.recipient.isGroupRecipient && !contact.isOurDevice && !contact.isSlave !contact.recipient.isGroupRecipient && !contact.isOurDevice && !contact.isSlave

View File

@ -158,7 +158,6 @@ class PNModeActivity : BaseActionBarActivity() {
val application = ApplicationContext.getInstance(this) val application = ApplicationContext.getInstance(this)
application.setUpStorageAPIIfNeeded() application.setUpStorageAPIIfNeeded()
application.setUpP2PAPIIfNeeded() application.setUpP2PAPIIfNeeded()
application.registerForFCMIfNeeded(true)
val intent = Intent(this, HomeActivity::class.java) val intent = Intent(this, HomeActivity::class.java)
intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK intent.flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
show(intent) show(intent)