Commit Graph

14 Commits

Author SHA1 Message Date
Matthieu 624cff117a Cache feeds with database using the new paging3 API 2020-11-27 17:02:52 +01:00
Matthieu d589e464ea Remove emulator tests from CI, since they are very flaky. 2020-11-08 20:24:38 +01:00
Matthieu 61d6ef47ac Adding time to notification 2020-09-10 20:20:23 +02:00
Matthieu 7bca413d60 Use nodeinfo endpoint to get info about the capabilities of the instance 2020-08-22 22:34:21 +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
Andrew Dobis 8fb5074f84
Added a dark mode (#151)
* first draft of dark mode, still needs some work

* changed dark mode colors

* fixed more buttons in dark mode

* Ran linter and fixed a few things

* mades things more kotlin-like

* added night mode selector in settings, but doesn't seem to work

* WIP Theme settings

* Fix callback not getting called (not registered)

* added theme test

* removed useless strings

* Fix dark mode not being applied

* Our app isn't called ThemedApplication and fixed fix

* changed default theme for API versions lower than 29

* WIP splashscreen nightmode

* Added custom splashscreen

* added night mode for splashscreen

* removed useless night values

* adapted icons for dark mode

* fixed light mode colors

* fixed a few light mode color bugs

* fixed bad login button

* fixed search tabs color

* fixed weird text input in post creation

* removed hardcoded strings in settings test

* removed unnecessary margin in login activity

* replace getIntrumentation.context with getInstrumentation.targetContext in settings test

Co-authored-by: Matthieu De Beule <61561059+Wv5twkFEKh54vo4tta9yu7dHa3@users.noreply.github.com>
2020-05-15 09:23:06 +02:00
Ulysse Widmer 20a2fd51ad
save images to gallery (#124)
* popup menu xml and longclicklistener on postfragment

* modularize popup menu code and added listener on homefeed

* fixed position

* image download implemented

* added download state messages

* added test and applied some lint cleanup suggestions

* added functionality to albums

* added test for album
2020-04-30 20:01:35 +02:00
Wv5twkFEKh54vo4tta9yu7dHa3 2333e5ec11
refactor profiles, add scrolling to fragments (#101)
* refactor profiles, add scrolling

* Undo unwanted changes by merge
2020-04-10 12:55:02 +02:00
Wv5twkFEKh54vo4tta9yu7dHa3 260062a72b
Notifications tab (#57)
* Add notification fragment to notification tab

* First functional-ish version of notifications

* Fix test failing due to profile requesting multiple times (?)

* Test notifications list

* Move resource that was in the wrong place for some reason

* Improve fallback image, add new drawable for it, add a margin

* Only show image thumbnail when there is one

* Go to post activity on click

* Add pull to refresh

* Refactor somewhat

* Test other notification too

* Test opening post

* add icons for various things (heart, follow, share, image fallback)
2020-03-18 20:56:42 +01:00
Wv5twkFEKh54vo4tta9yu7dHa3 20c5ff4ee0
First use login flow (#44)
* transform profile activity into fragment

* Implement swipeable tabs

* Ask for login on first start, add API endpoints, change profile to show the user's profile

* Add tests

* delete test for now

* Adapt test to changes (no more profile from drawer)

* Add unit test for api

* Add test for profile, refactor to allow testing, add exception to security policy to allow tests

* Adapt test to new situation

* Fix typo due to change

* refactor somewhat

* remove unused function

* remove test dependent on network

* update test

* remove test

Co-authored-by: Ulysse Widmer <ulysse.widmer@epfl.ch>
2020-03-13 11:48:45 +01:00
Matthieu b79ebca03a Some more tests, move values into xml 2020-03-07 18:13:26 +01:00
Matthieu 1405d69861 Add tests for login, fix coverage not being counted 2020-03-07 11:00:24 +01:00
Matthieu 14197355c1 Add application registration endpoint to API 2020-03-05 19:08:57 +01:00
Wv5twkFEKh54vo4tta9yu7dHa3 aa788f9720
Implement most of the API (#23)
Add Kotlin representations (data classes) of the Types of the Mastodon API. 
Create helper function to make API from the interface.
Test the deserialization.
2020-03-04 18:04:55 +01:00