Commit Graph

87 Commits

Author SHA1 Message Date
Matthieu b25262db2f Fix coverage stat, update dependencies, remove useless db passing 2021-04-20 12:07:18 +00:00
Matthieu 539c6973ec Update camerax 2021-04-18 20:56:17 +02:00
Matthieu 3af4708b9c update dependencies 2021-04-18 20:48:58 +02:00
Matthieu 473b71429b Add default env values 2021-04-09 22:01:09 +02:00
Matthieu f270c5a718 add dependency 2021-03-21 13:35:58 +01:00
Matthieu bd68012026 Make jcenter exceptions explicit 2021-03-16 00:48:08 +01:00
Matthieu 2632e045ab Update TraceDroid to jitpack 2021-03-16 00:23:10 +01:00
Matthieu e9430bb6ef Update dependencies 2021-03-14 21:55:20 +01:00
Matthieu 8b90e17fc4 Restore integration tests in CI 2021-02-17 22:55:31 +01:00
Matthieu 9bf62832d3 undo a dependency update for now 2021-02-04 20:49:33 +01:00
Matthieu 360e40b7fa Update dependencies 2021-02-04 17:34:56 +01:00
Matthieu ed5b780ee6 Release, and minify apk/use proguard properly 2021-01-25 20:41:00 +01:00
Matthieu c9a43f0c1c Increment version number 2021-01-14 11:51:15 +01:00
Matthieu 79c0d5c0b4 Finish removing deprecated kotlin-android-extensions uses 2021-01-13 11:16:03 +01:00
Matthieu bebf0233dc Start removing deprecated kotlin-android-extensions uses 2021-01-13 01:28:08 +01:00
Matthieu 8bfbe2fbb5 Finish implementing carousel+grid postcreation 2021-01-12 17:16:37 +01:00
Matthieu d6e7d2377f Carousel in the PostCreationActivity, change PhotoEditActivity to be more intuitive 2021-01-09 16:19:26 +01:00
Matthieu 0a4d285d14 Big reorganization of code into logical units (#251)
Not much actual code is changed
2020-12-26 12:10:54 +01:00
Matthieu 6c66863305 Update version number 2020-12-20 14:31:48 +01:00
Matthieu 08f8bbcc13 Update dependencies 2020-12-19 21:12:56 +01:00
Matthieu 570b76ecdc update dependencies 2020-12-08 18:12:00 +01:00
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 16529b40fd Alpha release 5 2020-11-06 14:49:49 +01:00
Matthieu 2e88e49875 Add error messages instead of toasts 2020-10-31 11:21:56 +01:00
Matthieu 96fd086c5f Fix upload adding error 2020-10-05 13:21:59 +02:00
Matthieu 6bf532698a Prepare for alpha 4 release 2020-10-04 23:40:42 +02:00
Matthieu 50dd0bad51 Add reporting and link sharing functionality, polish UI 2020-10-04 23:27:06 +02:00
Matthieu 0910ef176a Create About activity with licenses and dependency list 2020-09-25 16:46:01 +02:00
Matthieu fa5e9b764e update dependencies 2020-09-14 16:04:53 +02:00
Matthieu 98e18635b5 Add crash report using TraceDroid 2020-09-10 22:47:04 +02:00
Matthieu 7066c8e903 Switch to flexbox to fix #242 2020-09-10 22:09:14 +02:00
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
Matthieu 5f773bef1a release 3 2020-06-05 23:09:25 +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
Matthieu ccb6be454e Release 2 2020-05-22 23:10:57 +02:00
Wv5twkFEKh54vo4tta9yu7dHa3 d942c30898
Add upload progress bars and error handling to PostCreationActivity (#191)
* Add upload bar to PostCreationActivity

* Add upload error handling

* Fix test, remove duplicate api endpoint

* try to trigger ci

* don't show error all the time

* remove unused strings
2020-05-21 19:31:41 +02:00
Wv5twkFEKh54vo4tta9yu7dHa3 379b2c9a75
Alpha release 1 (#178) 2020-05-19 10:39:17 +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
Wv5twkFEKh54vo4tta9yu7dHa3 252a192ff3
Camera tab (#149)
* added CameraX depedencies

* added basis of camera activity layout

* basis of camera layout

* declare activity and request camera permissions

* request camera permissions

* implemented basic viewFinder aka stream preview

* added drawing of layout

* linked camera activity to new post fragment

* texture view now fills the entire screen

* added button, call to camera activity FOR RESULT and return to New Post Fragment

* can now take a photo a upload it

* locked camera activity in portrait orientation

* added basic test to CameraActivity

* added test with device orientation

* deleted orientation test as it broke the whole app

* deleted occurence of orientation tool for tests

* added buttons for flipping cameras and picture upload

* replaced NewPostFragment and took its job

* deleted cameraActivity

* replaced newPostFragment by Camera Activity

* revamped NewPostFragment

* perform basic test on buttons

* corrected retrieval of buttons

* robust camera fragment

* fix thumbnail permission requests

* refactor, finish fragment

* try to fix build not working on CI

* Add dependency

* Fix camera test

* update tests, delete obsolete xml

* Try to fix test

* Stop nullpointer that happens sometimes, when it shouldn't

* remove unused strings

* edit the photo instead of posting directly

* fix test after changing putextra name

* remove useless analyzer

* add test?

* better tests?

* add dependencies

* update dependencies

* try to fix build

* undo change to build.gradle

* try to fix tests

* try to fix tests

* remove useless listener

* save image so that ci can go through gallery

* remove extraneous permission

* Any app that declares the WRITE_EXTERNAL_STORAGE permission is implicitly granted this permission.

Co-authored-by: Andrea Clement <samuel.dietz@epfl.ch>
2020-05-15 12:10:28 +02:00
Sanimys 5ac3967400
Crop images (#163)
* Beginning of edit photos activity

* First batch for edition of photos

* EditActivity working properly except flow & save

* Added tests

* Changed name of tabLayouts back to tabs

* Resolved 2 errors from last build

* Truly resolved the 2 issues with requireContext/Activity

* Made test work with API23 emulator

* added 2 tests

* Corrected test @Before to have the right button to click on

* Added flow to newPost and few tests

* Added a test and refactor PhotoEditActivity

* Added flow from upload picture, tests doesn't work

* Added CropImageActivity from ucrop library, crashes for now

* Modified test FiltersIsSwipeableAndClickeable but still doesn't work

* Merge with master

* rectified test SaveButtonLaunchNewPostActivity

* FiltersIsSwipeableAndClickeable test completed

* Ready to merge to master

* resolved error in merge

* Added button save and upload, removed BitmapUtils

* Removed unnecessary libraries and imports

* Remove dependency on library for permissions

* Added crop, rescale of big images to avoid lag, bug fixes

* Remove unnessecary imports

Co-authored-by: Joachim Dunant <joachim.dunant@epfl.ch>
Co-authored-by: Matthieu De Beule <61561059+Wv5twkFEKh54vo4tta9yu7dHa3@users.noreply.github.com>
2020-05-15 11:46:12 +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 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
Ulysse Widmer b2842b8abe
fixed issue 152: ask write permissions (#154) 2020-05-08 11:42:41 +02:00
Sanimys c4946dd61c
Edit photos (#114)
* Beginning of edit photos activity

* First batch for edition of photos

* EditActivity working properly except flow & save

* Added tests

* Changed name of tabLayouts back to tabs

* Resolved 2 errors from last build

* Truly resolved the 2 issues with requireContext/Activity

* Made test work with API23 emulator

* added 2 tests

* Corrected test @Before to have the right button to click on

* Added flow to newPost and few tests

* Added a test and refactor PhotoEditActivity

* Added flow from upload picture, tests doesn't work

* Added CropImageActivity from ucrop library, crashes for now

* Modified test FiltersIsSwipeableAndClickeable but still doesn't work

* Merge with master

* rectified test SaveButtonLaunchNewPostActivity

* FiltersIsSwipeableAndClickeable test completed

* Ready to merge to master

* resolved error in merge

* Added button save and upload, removed BitmapUtils

* Removed unnecessary libraries and imports

* Remove dependency on library for permissions

Co-authored-by: Joachim Dunant <joachim.dunant@epfl.ch>
Co-authored-by: Matthieu De Beule <61561059+Wv5twkFEKh54vo4tta9yu7dHa3@users.noreply.github.com>
2020-05-08 10:53:56 +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
Ulysse Widmer 92c534ca1b
Feature/post creation (#83)
* added perm and features for cameraS, gps and external storage

* added camera activity accessible from main activity

* added button to redirect to camera activity

* implementing callback flow to use camera

* working camera

* added texture view for camera display

* added camera activity

* implemented texture listener

* camera not working, flow done, no feedback implemented

* camera working

* refactored code, still an activity

* added private to internal function, better error function handling

* deleted camera activity

* added camera fragment

* added camera fragment

* refactored camera as fragment

* necessary dependencies for fragment testing

* initial camera fragment test

* corrected access to activity form fragment

* Added state changes and termination

* added lines to test, to test coverage

* Removed unsupported state STARTED state transition

* Added basic tests to test code coverage

* use layout for tests, to trigger permissions requirements

* grant camera permission to app in camera test

* replaced null handlers by proper function getter

* changed layout, added takePictureButton

* using expresso to get code coverage on camea

* take picture flow not finished

* dummy change to camera test to perform new build

* added connection flow before test to reach main activity

* can take a picture and put it to ImageView

* replaced button text with images

* smaller buttons

* test camera fragment buttons

* added orientation handler

* changed icon to make travis happy

* test new espresso config for travis

* removed useless rule

* deleted useless val

* added layout ID's

* moved swipes from Before to Tests, and thread sleep

* stoped swiping, now tests from fragment directly

* start post creation flow

* use Uri when taking photo, can now go back from picture preview

* adjusted test and flow idea

* tests on displayed UI elements for the post creation fragment

* refactor camera fragment into transition new post fragemnt

* finished first phase: get a picture Uri

* fixed lint error found by travis CI

* added global timeout to test

* test the new way of test

* refactor new way of testing

* added in-app camera view and linked everything to the final flow + started API to post

* strugling on the upload media part

* upload image on server implemented

* post upload implemented

* added API call to get max_toot_chars and correct def of a post description

* fixed some tests

* fix tests: clicking on tabs make the app crash because of the camera fragment

* comment problematic chunk of code while samuel tries to fix it

* switch minimumsdk to api 24

* Revert "switch minimumsdk to api 24"

This reverts commit 24ce46dd82038b59732fd958e5e071ded39cd549.

* deactivited live camera for API 23

* tests for post creation fragment UI elements

* remove worthless UI testing and add gallery intent test

* removed camera intent for now

* some refactor

* lint error and more refactor

* more refactor on merge from master

* refactor and test for PostCreationActivity

* Revert "refactor and test for PostCreationActivity"

This reverts commit a0c146bcc545cdc3792df4806e6b0c908bd18747.

* Revert "Revert "refactor and test for PostCreationActivity""

This reverts commit 147a9ed80d5f9c9e3c38b5a977786bfb39eeb1b6.

* permissions correction for test

* updtated test

* fix a test and refactor

* relink correct fragment

* save picture locally

* test post button

* requested changes

* fixed required changes

* Revert "fixed required changes"

This reverts commit 405a9d4d1af05353e30028e60041cc1c97569c1b.

* redo change request

* added /media api response to mockserver

Co-authored-by: Andrea Clement <samuel.dietz@epfl.ch>
2020-04-24 12:44:12 +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