Currently we wait up to 10s for this operation to complete.
Replacing the two log lines with three, lets us halve the number of logs printed every 10ms,
but always print exactly one log line each iteration of the loop. Rather than:
```
02-10 19:58:48.880 3140 3140 D CleanupSession: Wait for all Realm instance to be closed (29 - 0)
02-10 19:58:48.880 3140 3140 D CleanupSession: Waiting 10ms
02-10 19:58:48.890 3140 3140 D CleanupSession: Wait for all Realm instance to be closed (29 - 0)
02-10 19:58:48.890 3140 3140 D CleanupSession: Waiting 10ms
02-10 19:58:48.900 3140 3140 D CleanupSession: Wait for all Realm instance to be closed (29 - 0)
02-10 19:58:48.900 3140 3140 D CleanupSession: Waiting 10ms
02-10 19:58:48.910 3140 3140 D CleanupSession: Wait for all Realm instance to be closed (29 - 0)
02-10 19:58:48.910 3140 3140 D CleanupSession: Waiting 10ms
02-10 19:58:48.920 3140 3140 D CleanupSession: Wait for all Realm instance to be closed (0 - 0)
```
We'll print:
```
02-10 19:58:48.880 3140 3140 D CleanupSession: Waiting 10ms for all Realm instance to be closed (29 - 0)
02-10 19:58:48.890 3140 3140 D CleanupSession: Waiting 10ms for all Realm instance to be closed (29 - 0)
02-10 19:58:48.900 3140 3140 D CleanupSession: Waiting 10ms for all Realm instance to be closed (29 - 0)
02-10 19:58:48.910 3140 3140 D CleanupSession: Waiting 10ms for all Realm instance to be closed (29 - 0)
02-10 19:58:48.920 3140 3140 D CleanupSession: Finished waiting for all Realm instance to be closed (0 - 0)
```
The above example took 40ms to finish and saved 4 log lines; you can see how it adds up if you take 10000ms to finish.
- reworking the isEventRead logic to always check if the new event exists locally, there's a race condition between eventFastLane and syncs where we end up mark unseen events as read if our last local message in a room is from ourselves
- this may also fix some events being instantly marked as read when being received
* develop: (146 commits)
exhaustive not needed anymore
Invert if condition and split long line
Use kotlin string builder
Same issue but in the test
Format
Fix a crash: java.util.IllegalFormatPrecisionException https://github.com/matrix-org/element-android-rageshakes/issues/33398
add changelog file for threads feature
add changelog file for threads feature
Formatting
Improve hidden events for threads
Add TODO for the next Weblate sync
ktlint format
PR remarks
Fix a lint false positive? Anyway this was not used. Restricted API ../../../matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/job/SyncWorker.kt:61: ListenableWorker.getTaskExecutor can only be called from within the same library group (referenced groupId=androidx.work from groupId=element-android)
It seems that now lint rule `MissingQuantity` is an error and not a warning by default.
Whitelist group 'org.webjars' on MavenCentral to fix lint execution
Fix conflicts
Formating & remove unused comments
Fix error in unit test
ktlint format
...
# Conflicts:
# vector/src/main/java/im/vector/app/features/navigation/Navigator.kt