mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-12 11:27:49 +00:00
Fix merge
This commit is contained in:
@@ -188,7 +188,7 @@ class Storage(context: Context, helper: SQLCipherOpenHelper) : Database(context,
|
||||
return DatabaseFactory.getSessionJobDatabase(context).getMessageSendJob(messageSendJobID)
|
||||
}
|
||||
|
||||
override fun getMessageReceivedJob(messageReceiveJobID: String): MessageReceiveJob? {
|
||||
override fun getMessageReceiveJob(messageReceiveJobID: String): MessageReceiveJob? {
|
||||
return DatabaseFactory.getSessionJobDatabase(context).getMessageReceiveJob(messageReceiveJobID)
|
||||
}
|
||||
|
||||
|
@@ -23,13 +23,13 @@ object OpenGroupManager {
|
||||
val isAllCaughtUp: Boolean
|
||||
get() {
|
||||
pollers.values.forEach { poller ->
|
||||
val jobID = poller.secondLastJob?.id
|
||||
val jobID = poller.secondToLastJob?.id
|
||||
jobID?.let {
|
||||
val storage = MessagingModuleConfiguration.shared.storage
|
||||
if (storage.getMessageReceivedJob(jobID) == null) {
|
||||
// If the second last job is done, it means we are now handling the last job
|
||||
if (storage.getMessageReceiveJob(jobID) == null) {
|
||||
// If the second to last job is done, it means we are now handling the last job
|
||||
poller.isCaughtUp = true
|
||||
poller.secondLastJob = null
|
||||
poller.secondToLastJob = null
|
||||
}
|
||||
}
|
||||
if (!poller.isCaughtUp) { return false }
|
||||
|
@@ -67,8 +67,6 @@ public class OptimizedMessageNotifier implements MessageNotifier {
|
||||
}
|
||||
|
||||
isCaughtUp = isCaughtUp && OpenGroupManager.INSTANCE.isAllCaughtUp();
|
||||
|
||||
Log.d("Ryan", "Is caught up? " + isCaughtUp);
|
||||
|
||||
if (isCaughtUp) {
|
||||
performOnBackgroundThreadIfNeeded(() -> wrapped.updateNotification(context, threadId));
|
||||
|
Reference in New Issue
Block a user