Commit Graph

53 Commits

Author SHA1 Message Date
Christian Kußowski c618baae70
refactor: (BREAKING) Make database required 2025-05-16 08:28:08 +02:00
Krille 5ec745915e
refactor: (BREAKING) Remove hive database and hive dependencies 2025-05-08 14:29:52 +02:00
Krille 3f04532ffe
refactor: Remove BasicRoomEvent type
We actually never use the
roomId of this type and the
matrix spec has changed in
a way that the roomId is
never sent there actually. So
it was super easy to just
replace all BasicRoomEvent
with BasicEvent. The roomId
became nullable anyway.
2025-01-09 11:05:01 +01:00
Krille 50ac4b55b2
fix: No roomId in BasicRoomEvent stores roomaccountdata silently wrong 2025-01-08 15:03:35 +01:00
Krille bc328aab5c
refactor: Use Event instead of EventUpdate for storing in db 2025-01-07 14:56:04 +01:00
Krille 2c42c12e72
refactor: Handle Room Account Data outside of Room Event Updates
This also makes sure that
room account data does not
get unnecessarily serialized
and deserialized before
storing it in the database.
For this it changes the
code flow at multiple
places.
2024-12-31 10:58:09 +01:00
Krille 135face535
refactor: (BREAKING) Remove deprecated Hive Database 2024-12-31 09:00:47 +01:00
Krille 2d2bbc60cd
refactor: Do not unnecessarily serialize and deserialize json for every account data object
This changes the database
api a little bit so that it does
not unnecessarily serialize
and deserialize all
account data objects. Should
improve the performance of
the SDK.
2024-12-30 12:00:29 +01:00
Krille e33a32e4fe
fix: Use MB and KB instead of MiB and KiB for file sizes 2024-12-18 11:35:23 +01:00
Krille 60d500956c
feat: Add deleteFile() endpoint to database 2024-11-12 08:32:32 +01:00
Mohammad Reza Moradi 9c32193dff
chore: add require trailing comma lint 2024-11-07 16:13:37 +01:00
Krille cabf357cf7
refactor: Cache profiles in database and refactor API 2024-07-23 08:51:10 +02:00
Nicolas Werner bc336709af
fix: state updates being also applied when fetching history
This could sometimes lead to the room name or the names of members in
the room being incorrect.
2024-06-10 14:51:37 +02:00
td 281510b950
feat: lcov and tag olm tests 2024-04-23 15:21:46 +05:30
krille-chan 20073ddd49
refactor: Store lastEvent in room object instead of room state 2024-03-18 13:18:36 +01:00
Krille 65c56f3630
feat: Store accesstokenExpiresIn and call softlogout 5 minutes before 2024-02-23 13:06:38 +01:00
Krille 38b1eb75e5
feat: Implement handling soft logout 2024-02-23 13:06:38 +01:00
Krille aa2b010155
ci: Test that database can write and read at least 5mb of data
This does not yet test on
Android but at least makes sure
that this problem does not
occur when using future
databases.
2023-12-27 10:33:27 +01:00
Krille d8ec1601a3
ci: Test all databases in unit tests 2023-12-15 14:24:00 +01:00
Krille eb869462aa
refactor: Add delete database method
This adds a delete database
method used for migration to
correctly delete the whole
legacy database instead just
empty it.
2023-12-12 12:57:23 +01:00
Christian Pauly 6db019ae23
feat: Implement new Matrix Dart SDK Database
fix: Edit last event breaks db

feat: Add native sqflite indexeddb database

feat: Split up preload and nonpreload room state boxes
2023-12-06 12:11:47 +01:00
Nicolas Werner f72d298a0b
fix: database tests group can't be async 2023-11-17 13:05:14 +01:00
Nicolas Werner 8b8a647cf9
chore: enable discarded_futures lint
BREAKING CHANGE: This changes the runInRoot method to not return a
future. As a user, if you need the result of an async computation passed
to runInRoot, please await it directly. Also the KeyVerification start
and a few call methods now return a future.
2023-11-17 12:59:27 +01:00
Krille 8cc863b1a3
feat: Store presences in database 2023-11-15 06:59:58 +01:00
Christian Pauly 7a5b013c92 refactor: Remove database transaction workaround
The workaround was from the
time when we have used
sqflite or when Hive had
bugs. But now HiveCollections
already supports transactions
in Dart zones and concurrent
write operations shouldn't
be a problem anymore.
2022-12-21 09:41:11 +01:00
Christian Pauly e6182db16b refactor: Remove deprecated fluffybox 2022-10-28 12:56:20 +02:00
Christian Pauly 7885281c72 refactor: Use import sorter and ci templates 2022-07-21 15:44:04 +02:00
Lanna Michalke 8fd3bbe28c feat: support HiveCollections as Database provider
- support Hive's new `CollectionBox` and `BoxCollection`

Signed-off-by: Lanna Michalke <l.michalke@famedly.com>
2022-05-21 20:19:52 +02:00
Henri Carnot bfdd4c810e Henri/fragmented timeline v2 2022-05-16 10:54:42 +00:00
Krille Fear 9a87850092 Revert "feat: non cached fragmented timeline"
This reverts commit 09b324674e
2022-05-12 09:46:29 +02:00
Henri Carnot 09b324674e feat: non cached fragmented timeline 2022-05-03 14:08:33 +00:00
Christian Pauly 5973e629fe feat: Get event from push notification 2022-04-14 17:01:05 +02:00
Krille Fear ac06864627 feat: Migrate olm sessions on database migration
This adds a getAllOlmSessions
endpoint to the database API and
implements them in both
implementations. This also
adds it to the database
migration.
2021-11-26 08:17:43 +01:00
Krille Fear 01eb851364 fix: 2021-11-23 15:48:18 +01:00
Krille Fear b99a78476a refactor: Remove Sembast database implementation
It was a nice experiment but it
loading everything into memory
is just too slow for big
accounts.
2021-11-18 19:55:21 +01:00
Krille Fear f5051a5afe feat: Implement sembast store
refactor: Use typed store
2021-11-16 09:50:25 +01:00
Nicolas Werner 3f83e5481c
refactor: port room test to nullsafety 2021-10-28 03:44:02 +02:00
Nicolas Werner ebd5bc3d24
refactor: make room nullsafe 2021-10-28 00:54:25 +02:00
Nicolas Werner 60956bde00 chore: port the remaining encryption files to nullsafety 2021-10-13 13:58:21 +00:00
Jayesh Nirve 77ca7523d0 refactor: remove unused clientId 2021-09-24 16:05:05 +02:00
Christian Pauly e13b00d127 refactor: Make RoomUpdate class null safe by removing it
RoomUpdate came from a time where we had no data model for
SyncUpdates but now we have and therefore this class is just
code duplication. This removes the class
and uses the SyncRoomUpdate class from
the package matrix_api_lite instead.
It needed a lot of refactoring at some places
where I also have removed some unnecessary null or type checks.
2021-09-08 12:31:55 +00:00
Christian Pauly 461874d6b1 fix: Remove print 2021-09-06 08:46:29 +02:00
Christian Pauly 9c1f79359e refactor: Replace all logic regarding sortOrder
The current implementation of sortOrder can be made way more easier now
by just keeping the sortOrder of the list
and the timelineFragments in the hiveStore. This needed a huge
change but mostly removes a lot of code which can be done
way more easy now. This also needed some rewriting of the setState logic and changes to
the prevEvent calculation. This solution should also be more stable.
More information:
https://www.reddit.com/r/fluffychat/comments/pfnlhq/the_sort_order_of_matrix_timelines/
2021-09-02 07:13:38 +00:00
Sorunome efb5842959
fix: Implement dummy transactions for hive
That way some concurrency bugs might be fixed, such as if two sync
requests are processed at the same time. That can e.g. happen if you
request history while a sync request is already being processed.
2021-09-01 19:11:46 +02:00
Nicolas Werner 8b46fa3fc2 fix: room account data key/type returned encoded
We uri encode all hive keys. But in some cases we never decode them.
This leads to fun issues like SSSS being unreadable after restart.

fixes https://gitlab.com/famedly/company/frontend/famedlysdk/-/issues/179
2021-09-01 16:37:51 +00:00
Lukas Lihotzki 9087f08775 chore: mxc url in Uri 2021-08-23 11:05:47 +02:00
Christian Pauly 9b7474e2f2 refactor: Update to dart 2.12 and opt out in all files
This also adds some missing license headers, I have detected while
using license header search&replace to add the
null safety opt out
2021-08-18 08:09:39 +02:00
Christian Pauly 86041513f8 refactor: Remove deprecated moor database
We have used some data models which were only used in moor in the tests.
I needed to rewrite them in the original data as well.
Also now the "fake database" on native is the same like on web now with hive.
2021-08-17 10:11:59 +02:00
Christian Pauly a7ffe4835d feat: Also migrate inbound group sessions
For users who do not use the chat backup this could be useful.
2021-06-19 11:03:52 +02:00
Christian Pauly c0c7f68bf3 chore: Rename to matrix 2021-06-18 09:58:25 +02:00