Commit Graph

5 Commits

Author SHA1 Message Date
Matthieu 7bca413d60 Use nodeinfo endpoint to get info about the capabilities of the instance 2020-08-22 22:34:21 +02:00
Matthieu 21925e7af4 Dependency injection
Configure dependency injection for API and the database. Uses Dagger (dagger.dev)

The API is held in a holder, so that it can be invalidated or recreated as needed.

Big refactor of the feeds, this introduces a bit more duplication of code (some very similar methods that differ only in the types or minor details), but now the inheritance makes more sense and there is less "forcing" to make the inheritance work (for example: no more casting Int to String just to have the right type for the key)
It should be easier to work with the feeds in the future, maybe we'll find better abstractions later on.
2020-07-26 20:56:01 +02:00
Ulysse Widmer 34f3d12dbc
Offline mode part 2 - Store posts in the DB (#209)
* store posts base idea

* switch to nullable types in Status object

* store posts first try + switch to nullable types for Attachment objects

* fix some tests, add converters

* update gradle

* wip: display stored post

* first draft of functional offline post

* added likes and shares to offline data

* fully functional

* clear activity correctly

* clear correctly activities

* refactored some tests and added offline feed test

* Distinguish between users, and only store home timeline

* count better

* Sort when getting statuses

* disable buttons, since we're offline anyways

Co-authored-by: Matthieu <61561059+Wv5twkFEKh54vo4tta9yu7dHa3@users.noreply.github.com>
2020-06-05 20:14:57 +02:00
Wv5twkFEKh54vo4tta9yu7dHa3 ca307abcde
multiAccount functionnality (#168)
* multiAccount functionnality

* remove sharedpreferences usages

* start fixing tests to work with changes

* remove test of removed functionality

* more fiddling with tests

* fix instance insert being broken

* clean up some more preferences usage

* close db

* try to fix a bunch of issues

* move db close

* add instance to user drawer item

* remove rule that is no longer needed

* correct mock server to fix test

* removed unused stuff

* fix domains not being validated correctly

* update test

* Delete q

* Move image filter application to a thread

* remove unused imports

* remove unused strings

* remove unused strings

* fix buttons (sometimes)

* solve some linter issues, fix saturation brightness contrast not being shown properly

* remove unused strings

* add tests for drawer

* remove unused imports, other linter suggestions

* fix broken auto linter fix
2020-05-19 09:49:34 +02:00
Ulysse Widmer e96d5e22a7
Offline mode - Phase 1 (#156)
* rework post entity

* refactor login activity

* added db instance to login activity

* remember user logins offline

* drawer works offline

* fixed some tests

* move imagefragment in fragment folder

* added tests for the new login flow

* add missing drawer test

* add login offline test

* added online login flow tests

* fixed tests

* added mockserver /instance repsonse

* fixed marie's request
2020-05-14 20:14:41 +02:00