Commit Graph

4417 Commits

Author SHA1 Message Date
SpiritCroc bea4cca2ab Fix crash on Android 6
Change-Id: Ie32c3dbc4b22afd673c5dcf581f8743f27d5bfc3
2022-03-19 11:51:19 +01:00
SpiritCroc ab9caef466 TokenChunkEventPersistor: always link all matching chunks
The previous fix only works around the issue when it is detected. This
may require re-entering the room once when it gets stuck. If we ensure
proper linking from the beginning, hopefully we don't run into any
issues at all.

Change-Id: Idf0f1882ec4f197f58f3818e63386a4def838b25
2022-03-18 08:08:51 +01:00
SpiritCroc 0d43fc6861 Ensure proper double linking of TimelineChunks
We need both directions so getOffsetIndex() produces correct results in
all cases.

Change-Id: Icbb3810c664febba976b81ae882a6581dc0f6056
2022-03-17 11:10:01 +01:00
SpiritCroc b982841ed5 Add read event tracking debugging
Change-Id: If9cc30f32af7bcadda9df6b04ad89ae248166da8
2022-03-17 10:58:39 +01:00
SpiritCroc d92ce97f84 Open at unread: Do not show loading animation if already reached end
Change-Id: I90b0a92cddb779651983f69871fa1942f2f45785
2022-03-16 15:39:16 +01:00
SpiritCroc 581c0ffcb0 Fix endless loading timeline due to conflicting chunks
Change-Id: I46918ed17b0bd5b2ac6797bfd2a9e3ffa42f14b8
2022-03-16 14:33:28 +01:00
SpiritCroc da43865733 [TMP] More ReadMarker debugging
Change-Id: I1defffc997864db74e15fe6b06645adeed7b67fe
2022-03-16 09:27:48 +01:00
SpiritCroc 4bb246ffe1 Fix local echos not being shown when re-opening rooms
Change-Id: Ib07f290028b7e97b64f3712c2cac01b5038f8dc8
2022-03-15 19:43:07 +01:00
SpiritCroc 4d8cedf6e5 Annoy-developer-toast: don't show for normal local echos
Change-Id: Ibec75423c5f7f7d4145e48f2da36e2b02f0caf7c
2022-03-15 16:11:22 +01:00
SpiritCroc 56cae372b4 Add Schildi-dbg settings
To control more invasive debugging

Change-Id: I7ee2980388db8999a76992ee7fffc70d8383a283
2022-03-15 11:19:53 +01:00
SpiritCroc c214c2233f [TMP] Update timeline debugging
And clean up some debugging that's probably not needed anymore

Change-Id: I3b154280487f02479f7c40b543da43ca39e9e2e3
2022-03-15 10:57:34 +01:00
SpiritCroc d0909c1790 [TMP] Show inconsistencies toast for developers investigating this
Change-Id: I06165bddcae980db60750ef77925c7b65704f3a2
2022-03-12 10:38:02 +01:00
SpiritCroc 647dd4398e Fix modifying the wrong events in TimelineChunk
I was observing cases where builtEvents[modificationIndex] was not
having the same eventId as the udpatedEntity in.
In particular, I observed both cases that
- there was no item in the list yet with the same eventId as the updated
  one
- there was an item with the same eventId already in the list, but at a
  different position.

Whenever this happened, the timeline would render missing, duplicated,
or swapped messages in the timeline.

Instead of relying on the modificationIndex to be the same for both the
change set and builtEvents, look up the proper index by eventId.

Change-Id: Ic03bdcc8210ec87b786795848f31e9085096b903
2022-03-12 09:32:25 +01:00
SpiritCroc 8d04a48157 Fix ChunkEntity.isMoreRecentThan() if both chunks linked to last forward
Imagine scenario:

[this] -> [chunkToCheck] -> [lastForwardChunk]

Then, both `isLastForward` checks will not return, and also the `chunkToCheck.doesNextChunksVerifyCondition { it == this }` will return false.
Since both chunks are connected to the last forward chunk, `isMoreRecent()` will still return `true`, which is wrong in this case.
So do not only check if chunkToCheck has this as any of the next chunks, but also the other way round.

Change-Id: I98727d85837e9b38a42297568df82f957b3a2dca
2022-03-11 11:29:43 +01:00
SpiritCroc 24133ba7b5 isReadMarkerMoreRecent(): use helper to properly compare chunks
Change-Id: I878b8145d3a9c85ea815f369e5d8f810343c8f62
2022-03-11 11:29:39 +01:00
SpiritCroc 12e4853c59 [TMP] More missing message debugging
Change-Id: Ia6ad08fa6a51365ba6f4e5a880f9ce804f3026c5
2022-03-11 08:50:17 +01:00
SpiritCroc f5afdefe2f Merge tag 'v1.4.4' into sc
Change-Id: Ibfb35ec30a51abebb652044719417f62c8a6be50

Conflicts:
	library/ui-styles/src/main/res/values/dimens.xml
	matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/sync/SyncTask.kt
	vector/src/gplay/java/im/vector/app/gplay/push/fcm/VectorFirebaseMessagingService.kt
	vector/src/main/AndroidManifest.xml
	vector/src/main/java/im/vector/app/features/home/HomeDetailFragment.kt
	vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailViewState.kt
	vector/src/main/java/im/vector/app/features/rageshake/BugReporter.kt
	vector/src/main/res/drawable/bg_unread_notification.xml
	vector/src/main/res/drawable/ic_add_reaction_small.xml
	vector/src/main/res/layout/item_room.xml
	vector/src/main/res/layout/item_timeline_event_text_message_stub.xml
	vector/src/main/res/xml/vector_settings_preferences.xml
2022-03-10 13:26:09 +01:00
SpiritCroc 7bfd3c8dca [TMP] Add some debugging to detect timeline inconsistencies
Note: may affect performance a little when loading the timeline, so
better revert when we are confident we have fixed the issue.

Change-Id: Ic4d31e47948984371a02ce51af7a8d56cb120234
2022-03-10 12:36:00 +01:00
ariskotsomitopoulos 92c1bc944d Fix realm crash on v1.4.4 2022-03-09 20:03:42 +02:00
SpiritCroc 2498da3631 Fix updating unread marker if not to latest chunk
SetReadMarkerTask was not updating the read marker when both the old and
the new fully read eventId weren't in the last chunk, even when the new
one was after the first one.

Change-Id: I175b335cf90328f676238ca23e45aa0f91b269c9
2022-03-09 18:07:38 +01:00
SpiritCroc 430963ae28 Fix missing messages when forward paging with chunks > 50 messages
- offsets() was not limiting in the right direction when loading
  messages forwards
- after fixing offsets(), more recent messages would not be loaded due
  to the isLastForward() check, so better prioritize the SUCCESS
  LoadMoreResult over the REACHED_END here

Change-Id: I48011adc57ff2d48bb7be37cb4dda8bd8f745bf8
2022-03-08 18:29:21 +01:00
Michael Kaye ab3f3fba68 Attempt to prevent the deprecated warning/error about Provider usage. 2022-03-08 10:38:23 +00:00
Michael Kaye fb05731bb9 If no identity server configured, log at info, not warn. 2022-03-08 10:12:13 +00:00
Michael Kaye 1569c2f3c7 Missing import of at-Ignore annotation. 2022-03-07 14:46:01 +00:00
Michael Kaye f32da28285 Ignore ThreadMessagingTest as it seems to cause other integration tests to fail. 2022-03-07 13:14:38 +00:00
SpiritCroc 2f5df9133f Merge tag 'v1.4.2' into sc
Change-Id: I8a96211645ff31284897d818ce93c7b5571fbd0f

Conflicts:
	library/ui-styles/src/main/res/values/styles_timeline.xml
	library/ui-styles/src/main/res/values/theme_black.xml
	library/ui-styles/src/main/res/values/theme_dark.xml
	library/ui-styles/src/main/res/values/theme_light.xml
	matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/RealmCryptoStoreMigration.kt
	matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/RealmSessionStoreMigration.kt
	vector/src/main/java/im/vector/app/features/home/HomeDrawerFragment.kt
	vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailViewState.kt
	vector/src/main/java/im/vector/app/features/home/room/detail/timeline/TimelineEventController.kt
	vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/MergedHeaderItemFactory.kt
	vector/src/main/java/im/vector/app/features/home/room/detail/timeline/helper/MessageInformationDataFactory.kt
	vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/AbsBaseMessageItem.kt
	vector/src/main/java/im/vector/app/features/html/PillImageSpan.kt
	vector/src/main/java/im/vector/app/features/navigation/DefaultNavigator.kt
	vector/src/main/java/im/vector/app/features/navigation/Navigator.kt
	vector/src/main/res/layout/item_room.xml
	vector/src/main/res/values/config.xml
2022-03-04 11:42:30 +01:00
ClaireG 2a9e582db5
Merge pull request #5405 from vector-im/cgizard/ISSUE-5402
[Create private room] Picture doesn't not displayed
2022-03-03 22:40:26 +01:00
Benoit Marty dd0d2e8101
Merge pull request #5383 from vector-im/dependabot/gradle/com.google.android.gms-oss-licenses-plugin-0.10.5
Bump oss-licenses-plugin from 0.10.4 to 0.10.5 - REQUIRE HUMAN INTERVENTION
2022-03-03 11:55:00 +01:00
SpiritCroc 20ba02db57 [TMP] Raise sync logging level
So we get these in rageshakes

Change-Id: I1efb8dd759cd03607ade0611c92a87df1b20c7f3
2022-03-03 08:55:34 +01:00
Benoit Marty 4396390409 Fix lint error (false positive, but anyway, not used) 2022-03-02 22:14:54 +01:00
Tiago Loureiro ad8809196f Fix overflow on media cache size 2022-03-01 13:12:46 -03:00
Filip Rakić 1216dde9c5 ignore KeysBackup tests 2022-03-01 13:16:01 +01:00
Benoit Marty 9cc35644a3
Merge pull request #5379 from vector-im/feature/aris/cleanup_threads_build_config
Cleanup enabling threads from buildConfig
2022-02-28 21:10:20 +01:00
Benoit Marty 71aac37ec7
Merge pull request #5330 from vector-im/feature/fga/more_realm_fixing
Feature/fga/more realm fixing
2022-02-28 21:02:10 +01:00
ariskotsomitopoulos ae98185c9d Cleanup enabling threads from buildConfig 2022-02-28 17:39:40 +02:00
dependabot[bot] ca56865dd1
Bump libphonenumber from 8.12.43 to 8.12.44
Bumps [libphonenumber](https://github.com/google/libphonenumber) from 8.12.43 to 8.12.44.
- [Release notes](https://github.com/google/libphonenumber/releases)
- [Changelog](https://github.com/google/libphonenumber/blob/master/making-metadata-changes.md)
- [Commits](https://github.com/google/libphonenumber/compare/v8.12.43...v8.12.44)

---
updated-dependencies:
- dependency-name: com.googlecode.libphonenumber:libphonenumber
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-24 23:10:16 +00:00
Benoit Marty ca8b69e377
Use correct copyright 2022-02-24 14:20:48 +01:00
ganfra f7c79a6de2 Realm: fix remaining frozen result 2022-02-23 18:02:02 +01:00
ganfra beeee7c84b Realm: avoid opening realm if not necessary in ReadReceiptsSummaryMapper 2022-02-23 18:01:19 +01:00
ganfra fb2ed9a7ac Rename getTimeLine to getTimeline to align naming. Also create TimelineEventDataSource. 2022-02-23 18:00:31 +01:00
Erik Johnston 7997435003 Also record `next_batch` 2022-02-23 11:23:05 +00:00
Erik Johnston 6105d7bea9
Log `since` token when doing an incremental sync
This aids debugging when `/sync` does something weird server side. Since we already log a line each time we do an incremental sync this shouldn't cause a problem.
2022-02-23 10:22:03 +00:00
Benoit Marty cc77afbf66 Version++ 2022-02-22 21:33:20 +01:00
Benoit Marty ed80fe517d Revert recent change to fix a crash
`readReceiptsSummaryEntity.realm` is null
2022-02-22 21:06:41 +01:00
ganfra 4cc80162ca Clean and add Changelog 2022-02-22 14:23:45 +01:00
ganfra 80d19fa497 Realm transactions: use Realm.WRITE_EXECUTOR (and use in Create/Join Room tasks) 2022-02-22 13:00:22 +01:00
ganfra d27acfa64f Read receipts: use RoomMember instead of User and avoid creating realm instance each time 2022-02-22 12:45:54 +01:00
ganfra fcca75ee23 Realm: remove usage of freeze as it was not necessary (unique thread) 2022-02-22 12:45:10 +01:00
Benoit Marty 95c00a1cce Udpate comment 2022-02-21 17:52:26 +01:00
SpiritCroc ecd28447c9 Merge tag 'v1.4.0' into sc
Change-Id: If953d524434cd8a7073a16014f4ec6850b72a226

Conflicts:
	library/ui-styles/src/main/res/values/styles_timeline.xml
	matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/media/PreviewUrlData.kt
	matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/database/RealmSessionStoreMigration.kt
	vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailViewState.kt
	vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt
	vector/src/main/java/im/vector/app/features/home/room/detail/TimelineViewModel.kt
	vector/src/main/java/im/vector/app/features/home/room/detail/timeline/TimelineEventController.kt
	vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/MessageItemFactory.kt
	vector/src/main/java/im/vector/app/features/home/room/detail/timeline/helper/MessageInformationDataFactory.kt
	vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/AbsMessageItem.kt
	vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/BaseEventItem.kt
	vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageBlockCodeItem.kt
	vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageFileItem.kt
	vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageImageVideoItem.kt
	vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageTextItem.kt
	vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/MessageVoiceItem.kt
	vector/src/main/java/im/vector/app/features/home/room/detail/timeline/item/ReadReceiptsItem.kt
	vector/src/main/java/im/vector/app/features/home/room/list/RoomListDisplayModeFilter.kt
	vector/src/main/java/im/vector/app/features/html/EventHtmlRenderer.kt
	vector/src/main/java/im/vector/app/features/media/ImageContentRenderer.kt
	vector/src/main/java/im/vector/app/features/navigation/DefaultNavigator.kt
	vector/src/main/java/im/vector/app/features/settings/VectorSettingsLabsFragment.kt
	vector/src/main/res/drawable/ic_filter.xml
	vector/src/main/res/layout/fragment_qr_code_scanner_with_button.xml
	vector/src/main/res/layout/fragment_timeline.xml
	vector/src/main/res/layout/item_bottom_sheet_message_preview.xml
	vector/src/main/res/layout/item_timeline_event_base.xml
	vector/src/main/res/layout/item_timeline_event_file_stub.xml
	vector/src/main/res/layout/item_timeline_event_notice_stub.xml
	vector/src/main/res/layout/item_timeline_event_voice_stub.xml
	vector/src/main/res/layout/view_voice_message_recorder.xml
	vector/src/main/res/menu/menu_timeline.xml
2022-02-19 10:55:47 +01:00