mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-24 02:47:44 +00:00
feat: add basic contact logic for setting local contact state. Need to implement handling properly
This commit is contained in:
@@ -204,7 +204,7 @@ interface StorageProtocol {
|
||||
fun removeReaction(emoji: String, messageTimestamp: Long, author: String, notifyUnread: Boolean)
|
||||
fun updateReactionIfNeeded(message: Message, sender: String, openGroupSentTimestamp: Long)
|
||||
fun deleteReactions(messageId: Long, mms: Boolean)
|
||||
fun unblock(toUnblock: List<Recipient>)
|
||||
fun setBlocked(recipients: List<Recipient>, isBlocked: Boolean)
|
||||
fun blockedContacts(): List<Recipient>
|
||||
|
||||
// Shared configs
|
||||
|
||||
@@ -150,7 +150,9 @@ data class ConfigurationSyncJob(val destination: Destination): Job {
|
||||
// store the new hash in list of hashes to track against
|
||||
configFactory.appendHash(config, insertHash)
|
||||
// dump and write config after successful
|
||||
configFactory.persist(config)
|
||||
if (config.needsDump()) { // usually this will be true?
|
||||
configFactory.persist(config)
|
||||
}
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
Log.e(TAG, "Error performing batch request", e)
|
||||
|
||||
@@ -163,7 +163,9 @@ class Poller(private val configFactory: ConfigFactoryProtocol, debounceTimer: Ti
|
||||
}
|
||||
}
|
||||
// process new results
|
||||
configFactory.persist(forConfigObject)
|
||||
if (forConfigObject.needsDump()) {
|
||||
configFactory.persist(forConfigObject)
|
||||
}
|
||||
}
|
||||
|
||||
private fun poll(snode: Snode, deferred: Deferred<Unit, Exception>): Promise<Unit, Exception> {
|
||||
|
||||
Reference in New Issue
Block a user