fix: checking the last read open to message and make sure that scroll behaviour matches expected, fix the config sync job not deleting ALL old hashes only latest

This commit is contained in:
0x330a
2023-05-03 19:26:40 +10:00
parent f7b4fe216f
commit 281b8dac33
2 changed files with 11 additions and 8 deletions

View File

@@ -440,6 +440,9 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
lifecycle.repeatOnLifecycle(Lifecycle.State.RESUMED) {
// only update the conversation every 3 seconds maximum
// channel is rendezvous and shouldn't block on try send calls as often as we want
val layoutManager = binding?.conversationRecyclerView?.layoutManager as? LinearLayoutManager ?: return@repeatOnLifecycle
val lastItemPos = layoutManager.findLastCompletelyVisibleItemPosition()
// adapter.item
withContext(Dispatchers.IO) {
storage.markConversationAsRead(viewModel.threadId, SnodeAPI.nowWithOffset)
}