Commit Graph

20 Commits

Author SHA1 Message Date
Matthieu 22b03fca54 add poll to prevent crashes with mastodon 2020-11-01 19:57:56 +01:00
Matthieu 2c1fef2a0a Make null-ness possibility explicit. Improve fallback of displayname 2020-11-01 18:44:32 +01:00
Matthieu 2e88e49875 Add error messages instead of toasts 2020-10-31 11:21:56 +01:00
Matthieu 61d6ef47ac Adding time to notification 2020-09-10 20:20:23 +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
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
Andrew Dobis 600813baaa
A few UI tweaks (#126)
* added timestamp and 'from domain' for people who aren't on our domain

* added abbreviated timestamp for feed posts

* changed timestamp text color

* added share notification clicking

* fixed search

* Fixed broken test

* refactored notification clicks a bit

* fixed accounts in test
2020-05-01 10:39:25 +02:00
Wv5twkFEKh54vo4tta9yu7dHa3 ce0b914d78
Search (#121)
* Search

* refactor

* add hashtags

* clean up xml, add some spacing to hashtag list

* Fix invalidation causing failures

* Move Tag's id to read-only member value

* Refactor

* Add test, rename things to be more sensible
2020-04-30 17:54:21 +02:00
Andrew Dobis 8265ac2d62
Reblogging and HTML text (#107)
* Changed Post interaction icons and added click feedback

* added reblog and unreblog api implementations

* Use fancy animated buttons

* WIP reposter

* WIP reblog button

* renamed ViewHolder => PostViewHolder

* activated reblogger in feed

* added custom html parser, still need to fix clickable links

* added parsed HTML in notifications

* fixed mention click

* added tests for reblog and clickable mentions

* adapted unit tests to work with new html parser

* changed incoherent comment

* made hashtags slightly less useless

* removed unit test that were no longer valid

* removed useless test

* trying to fix tests

* fixing tests

* trying to improve coverage a little

* removed unused code to improve coverage

* changed cast to type converter

* added failure responses to help coverage

* added mock server response for reblogging

* fixed broken json

* trying to fix a broken test

* Tweak tests

* Typo in test

* Add scrolls to make tests pass on small screens

* fixed old JSON in mockserver

* fixed linter issue

Co-authored-by: Matthieu <61561059+Wv5twkFEKh54vo4tta9yu7dHa3@users.noreply.github.com>
2020-04-23 17:48:45 +02:00
Ulysse Widmer 8950d4c162
Reconnect button (#108)
* reconnect button and profile button functionality

* fix lint error and cleaned some imports

* more lint errors

* added tests for the drawer menu

* added some timing for the animations

* drawer settings test
2020-04-17 15:07:04 +02:00
Andrew Dobis f8d6c67079
Commenting & seeing comments on a post ( issues: #37 #77 ) (#87)
Comment and like buttons added + a few UI tweaks 

* WIP posts

* WIP posts

* trying to add images

* trying to add images

* Got posts working and linked them to the profile

* added tests for Post

* layout changes

* moved a test file

* refactoring

* refactoring

* removed wrong annotation in unit test

* removed an import that was breaking the build

* removed tests that broke from merge, will override with master

* added UI test for the post activity

* WIP posts

* WIP posts

* trying to add images

* trying to add images

* Got posts working and linked them to the profile

* layout changes

* refactoring

* refactoring

* WIP posts

* WIP posts

* trying to add images

* trying to add images

* Got posts working and linked them to the profile

* added tests for Post

* layout changes

* moved a test file

* refactoring

* refactoring

* removed wrong annotation in unit test

* removed an import that was breaking the build

* removed tests that broke from merge, will override with master

* fixed merging errors

* trying my best to merge

* removed drawable definition in activity_post.xml

* Started converting Post to a fragment

* got a working feed

* WI

* removed non-valid test

* rebase on other branch

* moved the feed to the home page

* 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

* added a feed test

* WIP posts

* trying to add images

* WIP posts

* trying to add images

* Got posts working and linked them to the profile

* added tests for Post

* layout changes

* moved a test file

* refactoring

* refactoring

* WIP posts

* WIP posts

* trying to add images

* trying to add images

* Got posts working and linked them to the profile

* added tests for Post

* layout changes

* moved a test file

* refactoring

* refactoring

* removed wrong annotation in unit test

* removed an import that was breaking the build

* removed tests that broke from merge, will override with master

* added UI test for the post activity

* WIP posts

* trying to add images

* WIP posts

* trying to add images

* Got posts working and linked them to the profile

* added tests for Post

* layout changes

* moved a test file

* refactoring

* refactoring

* WIP posts

* WIP posts

* trying to add images

* trying to add images

* Got posts working and linked them to the profile

* added tests for Post

* layout changes

* moved a test file

* refactoring

* refactoring

* removed wrong annotation in unit test

* removed an import that was breaking the build

* removed tests that broke from merge, will override with master

* added UI test for the post activity

* fixed merging errors

* trying my best to merge

* removed drawable definition in activity_post.xml

* Started converting Post to a fragment

* got a working feed

* WI

* removed non-valid test

* WIP posts

* WIP posts

* trying to add images

* trying to add images

* Got posts working and linked them to the profile

* added tests for Post

* layout changes

* moved a test file

* WIP posts

* WIP posts

* trying to add images

* trying to add images

* Got posts working and linked them to the profile

* added tests for Post

* layout changes

* moved a test file

* refactoring

* refactoring

* refactoring

* refactoring

* removed wrong annotation in unit test

* WIP posts

* WIP posts

* WIP posts

* WIP posts

* trying to add images

* trying to add images

* trying to add images

* trying to add images

* Got posts working and linked them to the profile

* Got posts working and linked them to the profile

* added tests for Post

* layout changes

* layout changes

* moved a test file

* refactoring

* refactoring

* refactoring

* refactoring

* removed wrong annotation in unit test

* removed an import that was breaking the build

* removed an import that was breaking the build

* removed tests that broke from merge, will override with master

* removed tests that broke from merge, will override with master

* added UI test for the post activity

* fixed merging errors

* trying my best to merge

* removed drawable definition in activity_post.xml

* Started converting Post to a fragment

* got a working feed

* WI

* removed non-valid test

* rebase on other branch

* moved the feed to the home page

* added a feed test

* added a working feed test

* fixed broken test

* merged with master

* added a max height for images and made profile pictures round

* Added a default image for the post

* created a PostActivity to look a single posts

* fixed buggy postActivity

* Complete overhall of the feed UI

* removed test that didn't please Travis

* removed legacy test

* changed feedAdapter init location (outside of network callback)

* changed the feed from public timeline to home timeline

* Refactored myProfile page

* Converted profile picture to round image

* restored feed test

* I can like a post, but unlike is still a WIP

* Liking kind of works now and added tests

* fixed an error, now we can unlike as well

* fixed travis constraint error

* Display user's posts on profile page

* moved test to Mock server tests

* fixed test

* last resort debugging

* Changed fixed size of profile posts

* last resort debugging

* last resort debugging

* last resort debugging

* made post_activity profilepic round

* Total refactor of profile posts

* still have a weird bug with the comments: input is always null (WIP)

* still trying to fix coments

* removed annoying side margins in the home feed

* trying to fix comments

* fixed null comment

* converted all posts back to statuses and got rid of post

* Refactored recycler view

* Merged with my-profile

* Posts displayed on profile page

* Added links to profile activity where needed

* fixed comment posting

* finished implementing comments, but api is buggy so none are visible

* removed useless space in profile page

* fixed ci config bug

* trying to trigger ci hook (github was down last time)

* updated tests with master tests

* added tests for the comments

* added tests for the comments

* added first() matcher to fix comment test

* still trying to fix comment tests' null progress bar

* getting rid of that null progress bar

* added comment test

* fixed merge error

* added like button test

* added more post tests

* took pr coments into account

* added back an old test

* added mockServer response for comment test and fixed comment null pointer bug

* changed notification UI to better separate notifications

* added mockserver response for likes and corrected like toggling error

* added a test for posting comments

* fixed typo in test

* a gift for code climate

* refactored stuff

* fixed broken imports

* comment refactored as xml

Co-authored-by: Matthieu <61561059+Wv5twkFEKh54vo4tta9yu7dHa3@users.noreply.github.com>
Co-authored-by: mjaillot <marie.jaillot@epfl.ch>
2020-04-11 12:55:06 +02:00
Ulysse Widmer a14310bbfc
refactor MocKServer for test and some lint warnings (#102) 2020-04-10 12:25:54 +02:00
mjaillot 1b6753d119
User profile #79 (#90)
* Refactored myProfile page

* Total refactor of profile posts

* Merged with my-profile

* Posts displayed on profile page

* Added links to profile activity where needed

* Removed MyProfileTest with swipes

* Tests ProfileActivity from Notifications

* Add test, fix progressbar being null
2020-04-09 22:36:59 +02:00
Matthieu 0ac44ac561 remove useless override 2020-04-03 09:35:42 +02:00
Matthieu 0d6a5b6c86 Refactor into superclass 2020-04-03 09:11:57 +02:00
Wv5twkFEKh54vo4tta9yu7dHa3 17c74dd430
Merge branch 'master' into scroll_load 2020-04-03 07:33:22 +02:00
Matthieu 1a684b7a47 Add comments, clean up 2020-04-02 22:16:03 +02:00
Matthieu ba8980652c Infinite loading, make glide aware of the recyclerview 2020-04-02 19:57:07 +02:00
Wv5twkFEKh54vo4tta9yu7dHa3 61cdb1118b
WIP: Loading (#76)
* Add loading indications, refactor fragments into common parent class

* Add cirrus

* actually add cirrus

* Add timeouts

* Fix test rules

* Add gitlab ci file to tes

* move tests to MockedServer to not have infinite waits by Espresso

* Update README for gitlab badge
2020-04-01 19:38:21 +02:00
Matthieu 0a3cd85d83 Add loading indications, refactor fragments into common parent class 2020-03-21 18:12:00 +01:00