Commit Graph

427 Commits

Author SHA1 Message Date
Matthieu 49df7279b2 fix progressbar never stopping 2021-04-29 15:55:49 +02:00
Matthieu ac2eca9e57 fix follow{ing,ers} for mastodon, start fixing viewmodel brokenness 2021-04-29 15:42:08 +02:00
Matthieu 34660c1280 fix nothing to see here showing when it shouldn't 2021-04-28 15:12:21 +02:00
Matthieu 6efa946809 less type casting 2021-04-28 14:28:32 +02:00
Matthieu e52bf51e18 tweak filtering for initial scroll 2021-04-22 17:04:35 +02:00
Matthieu f3f3fb97f8 Add test repetition 2021-04-22 16:55:23 +02:00
Matthieu 1ce5c54055 rename app id 2021-04-22 11:47:18 +02:00
Matthieu cb3dd30de6 Fix edit button, add test 2021-04-21 22:07:05 +00:00
Matthieu 349401dee4 try making doubletap less sensible 2021-04-20 16:54:57 +02:00
Matthieu b25262db2f Fix coverage stat, update dependencies, remove useless db passing 2021-04-20 12:07:18 +00:00
Matthieu a3e1e3c669 stop using api objects but use apiholder directly 2021-04-19 11:43:14 +02:00
Matthieu e41e5b4f19 Remove remnants of token and credential passing 2021-04-18 23:43:47 +02:00
Matthieu dfb452113d use interceptor, remove arguments from api calls 2021-04-18 22:32:50 +02:00
Matthieu 65f23e63fe fix crash 2021-04-18 20:23:57 +02:00
Matthieu 9f9d0e23bc make json fields nullable, correct request logic 2021-03-27 15:24:58 +01:00
Matthieu 8dacdc1970 Merge branch 'master' into follow_requests 2021-03-27 13:26:15 +01:00
mjaillot 4ef9f1cfc6 Merge branch 'master' into click_notifications 2021-03-27 12:47:08 +01:00
mjaillot ce9b83fe60 Open account from notification 2021-03-27 12:44:55 +01:00
Matthieu 173b8e8e01 allow follow requests 2021-03-26 19:54:04 +01:00
mjaillot dce7c45e21 Added some strings 2021-03-26 17:51:42 +01:00
mjaillot 3972ffd093 Merge branch 'master' into profile_feed 2021-03-26 14:13:56 +01:00
mjaillot a992fac150 Merge branch 'master' into profile_feed 2021-03-26 10:43:28 +01:00
mjaillot 5da2750b1c Finished refactor 2021-03-26 10:42:51 +01:00
Matthieu 191aa3ff57 Fix double tap like 2021-03-26 10:26:00 +01:00
Matthieu f270c5a718 add dependency 2021-03-21 13:35:58 +01:00
Matthieu 9d602efbb3 Fix upload of edited images, and replace deprecated onactivityresult with resultcontracts 2021-03-21 13:04:09 +01:00
mjaillot 4096af2872 Profile fixes 2021-03-20 12:43:13 +01:00
mjaillot c2dd66c54f Refactor initAdapter 2021-03-19 17:28:13 +01:00
Matthieu 2cb2ecdb72 Fix tracedroid, accept json as responses from api 2021-03-19 10:34:43 +01:00
Matthieu 2632e045ab Update TraceDroid to jitpack 2021-03-16 00:23:10 +01:00
Matthieu 0fdcdf3c21 Update instance if it already exists (to enable multiple accounts of same instance) 2021-03-15 19:54:42 +01:00
Matthieu 29906a355b Fix discover icon not showing 2021-03-15 19:01:43 +01:00
Matthieu d13b34ed0d Update for paging dependency update 2021-03-14 23:03:36 +01:00
Matthieu 10bf68978d Merge branch 'master' into profile_feed 2021-03-14 22:54:39 +01:00
Matthieu e9430bb6ef Update dependencies 2021-03-14 21:55:20 +01:00
Matthieu a90a42f033 Fix comments (still using linearlayout for now) 2021-03-14 17:21:56 +01:00
Matthieu f9db1543a9 Open comments in activity. Remove useless fragment 2021-03-04 13:53:07 +01:00
Matthieu 1778f775b2 Albums scrollable and CW with blurhash 2021-03-03 14:00:44 +01:00
mjaillot f9f4a6b8be Rearrange profile layout 2021-02-26 11:21:04 +01:00
Matthieu 8b90e17fc4 Restore integration tests in CI 2021-02-17 22:55:31 +01:00
Matthieu fe08782803 At least make integration tests compile 2021-02-11 01:24:05 +01:00
Matthieu 70f0e59d66 add blurhash to discover 2021-02-09 23:28:08 +01:00
Matthieu 6f9bbf5100 Fix discover 2021-02-09 20:47:04 +01:00
Matthieu c88f4a4cec Initial support for using API size values for single photos 2021-02-08 18:01:48 +01:00
mjaillot bcb40a61ae Refactor profile feed to activity 2021-02-08 15:07:23 +01:00
Matthieu f66475bbdb Initial blurhash use 2021-02-08 01:32:10 +01:00
Matthieu 71714a5f3c Check if size of image isn't too big, and show dialog if it is 2021-02-07 22:55:34 +01:00
Matthieu 50957ea228 Disable add picture button and gray it out when max attained 2021-02-06 17:31:56 +01:00
Matthieu cf45f79ad9 Don't allow adding more images than the server permits 2021-02-05 19:06:57 +01:00
Matthieu cf3021c26a Alert user if API is not enabled. Store some settings in db 2021-02-05 14:48:12 +01:00
Matthieu 9bf62832d3 undo a dependency update for now 2021-02-04 20:49:33 +01:00
Matthieu f8b3e1627a use nodeinfo whenever possible 2021-02-04 20:44:31 +01:00
Matthieu ed1d35b539 Fix media descriptions being wrapped with string 2021-01-25 18:54:55 +01:00
Matthieu 03cf950bab Add check before proceding to upload to fix multi upload 2021-01-25 18:18:56 +01:00
Matthieu f3aff36ad7 Fix crash when clicking on username 2021-01-25 17:34:36 +01:00
Matthieu 8471fd4909 Merge branch 'plurals' into 'master'
Add plurals to strings

Closes #234

See merge request pixeldroid/PixelDroid!297
2021-01-25 11:06:30 +00:00
Matthieu 59d513cfac Add plurals to strings 2021-01-25 11:52:27 +01:00
Matthieu 4c935918d6 Add 'What's an instance' dialog in login instead of opening link 2021-01-25 10:57:27 +01:00
Matthieu 9dd6f3f1a8 Add image description functionality 2021-01-25 00:02:03 +01:00
Matthieu 7798523ad1 use max instead of min_id 2021-01-22 19:42:56 +01:00
Matthieu b221808f9c some progress on fixing profile stuff 2021-01-22 19:25:57 +01:00
mjaillot 567fa40c20 WIP profile feed 2021-01-22 16:42:23 +01:00
Matthieu 80cdaacf03 Fix infinite dialog loop 2021-01-14 13:15:40 +01:00
Matthieu 417332fb5c Do edit check in onBackPressed to also catch pressing the system back button 2021-01-14 12:49:50 +01:00
Matthieu 6fa4488296 Use view binding more 2021-01-13 22:46:00 +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 4b8f47155c Make buttons prettier, defer uploading to when the image is posted, add remove button 2021-01-10 22:30:35 +01:00
Matthieu d6e7d2377f Carousel in the PostCreationActivity, change PhotoEditActivity to be more intuitive 2021-01-09 16:19:26 +01:00
Matthieu 8e5e2c2d87 Fix #271 by updating the apiholder before relaunching the application 2021-01-05 00:38:16 +01:00
Matthieu edd6f4d0b4 Everything is a coroutine 2020-12-30 18:13:39 +01:00
Matthieu f38e823578 More coroutines. 2020-12-29 22:35:45 +01:00
Matthieu 1254a3566d More coroutinification 2020-12-29 22:14:32 +01:00
Matthieu 3a91b02e55 Use coroutines 2020-12-29 19:34:48 +01:00
Matthieu 86543ee74c Correct a bunch of small things raised by inspection 2020-12-28 20:53:24 +01:00
Matthieu 46c4719a72 Remove duplicate or unused drawables. Use dynamic colours instead of night drawables 2020-12-28 17:43:07 +01:00
Matthieu ff7f18d2ae Refactor and move out openUrl method to utils 2020-12-28 17:18:07 +01:00
Matthieu d6d1262629 Don't query but try catch to bypass new package visibility feature in android 11 2020-12-28 17:00:02 +01:00
Matthieu 12ed06cce8 Move ReportActivity to posts package 2020-12-28 15:20:31 +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 77e30cf04c Remove useless interfaces 2020-12-20 18:39:50 +01:00
Matthieu 6c66863305 Update version number 2020-12-20 14:31:48 +01:00
Matthieu 94cb52e25c Merge branch 'fix_report' into 'master'
Fix report API

See merge request pixeldroid/PixelDroid!269
2020-12-19 21:47:23 +01:00
Matthieu 0f5d7c20bd Fix report API 2020-12-19 21:41:07 +01:00
Matthieu bba487b98b Hide report option for your own posts 2020-12-19 21:13:30 +01:00
Matthieu 08f8bbcc13 Update dependencies 2020-12-19 21:12:56 +01:00
Matthieu bacd5e138b Don't re-bind camera if already bound
This prevents flashing black when entering the CameraFragment
2020-12-19 13:23:59 +01:00
Matthieu 1e2c73c2cf List of lambdas to defer creation of fragments 2020-12-19 13:22:45 +01:00
Matthieu 00f3dd5a19 Re-use gson instance (improves performance) 2020-12-19 13:14:38 +01:00
Matthieu 60ba840421 Use BaseActivity to inject the database and api 2020-12-16 22:11:45 +01:00
Matthieu 9980d651d2 Remove imports and make CameraActivity inherit from BaseActivity 2020-12-16 21:50:27 +01:00
Matthieu 969ec214fa Fix default language being broken 2020-12-16 17:27:29 +01:00
Matthieu 689dffe7c1 Add in-app language setting 2020-12-11 16:53:12 +01:00
Matthieu e71e5c304a clean imports 2020-12-08 18:33:16 +01:00
Matthieu 3370001c4c store client ID and secret, and set up refresh if a request fails with 401 2020-11-29 20:19:25 +01:00
Matthieu bf9d5287ba Store refresh tokens 2020-11-29 14:58:54 +01:00
Matthieu f465e495d2 Delete posts with three-dot "more options" menu 2020-11-28 15:05:13 +01:00
Matthieu 624cff117a Cache feeds with database using the new paging3 API 2020-11-27 17:02:52 +01:00
Matthieu 16529b40fd Alpha release 5 2020-11-06 14:49:49 +01:00
Matthieu 245c9c2e64 Hide comments by default. Fixes #141 2020-11-03 10:13:43 +01:00
Matthieu ae96961dbe make sure album icon is hidden on re-used recyclerview viewholder 2020-11-02 22:36:25 +01:00
Matthieu c65a121e28 add reload and error to profile 2020-11-02 21:58:01 +01:00
Matthieu 7f04028125 Move duplicated error to layout file, create strings 2020-11-02 13:28:27 +01:00
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 5be0f1f773 Fix thumbnail on newer android versions 2020-11-01 00:07:28 +01:00
Matthieu afeae16c31 Don't reset the pages to 0, but to 1 2020-10-31 22:40:05 +01:00
Matthieu d0015b805c Add album icon, fix some API calls, remove superfluous API call 2020-10-31 22:11:01 +01:00
Matthieu 2e88e49875 Add error messages instead of toasts 2020-10-31 11:21:56 +01:00
Matthieu 40f4d03bd1 Add serializable to Source 2020-10-28 11:19:36 +01:00
Matthieu 96fd086c5f Fix upload adding error 2020-10-05 13:21:59 +02:00
Matthieu 50dd0bad51 Add reporting and link sharing functionality, polish UI 2020-10-04 23:27:06 +02:00
Matthieu c014eef3f3 Make action bars contain info and back button 2020-09-26 00:25:08 +02:00
Matthieu b14242a448 Extract strings 2020-09-25 17:00:08 +02:00
Matthieu 0910ef176a Create About activity with licenses and dependency list 2020-09-25 16:46:01 +02:00
Matthieu 4f5e08d73e fix for dark mode 2020-09-13 23:48:03 +02:00
Matthieu 7c361aefe0 Add hamburger button to tab bar 2020-09-13 23:35:09 +02:00
Matthieu 98e18635b5 Add crash report using TraceDroid 2020-09-10 22:47:04 +02: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
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
Sanimys 7981ae8643
enable creating albums (#229)
* Moved the crop button so that it doesn't take space in the activity

* Semi transparent in the middle, same position than the image

* First draft of the album creation

* choose multiple images in gallery

* Added functionalities to Album creation

* merge with master

* Gallery of images selected for the album creation

* to merge with master

* Images editable individually

* Creation of album is now possible

* Added tests

* Added test to edit picture selected

* merge PostCreation and AlbumCreation

* Merged completely PostCreation and AlbumCreation

* removed albumCreation in Manifest

* Refactored slightly

* Don't re-upload all images at each edit, only re-upload one

* Make sure all images are uploaded, correctly calculate progress

* comment assert, sorry

* fix test

* fix merge

Co-authored-by: Joachim Dunant <joachim.dunant@epfl.ch>
Co-authored-by: Matthieu <61561059+Wv5twkFEKh54vo4tta9yu7dHa3@users.noreply.github.com>
2020-06-05 23:49:28 +02:00
Samuel Dietz b01922126f
Better sensitive profiles (#230)
Stop using the sensitive icon as the placeholder for every post, but only load it for actually sensitive posts.
2020-06-05 20:44:57 +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 7170a3d285 Why document when you can just not? Thank you Google 2020-06-03 19:33:46 +02:00
Wv5twkFEKh54vo4tta9yu7dHa3 0348696f3a
Improve upload flow performance & visual feedback (#224)
* Make less copies, detect if no changes are made for a fast path, give some feedback while processing the image

* avoid NPE on camera, use more generic inputstream so that file picking works again

* stop using resource in test

* stop using resource in test

* fix uri issue and add test

* Test dialog, stringify strings

* click error button, for fun

* test error button in post creation

* check retry of upload works

* Remove wrong button click in test

* add some tests for followers list

* test edit profile button

* test back button

* try to get all callbacks to be called

* Fix typo

* Make sure crop is not ignored
2020-06-03 16:32:02 +02:00
Wv5twkFEKh54vo4tta9yu7dHa3 0f122ce4e2
Make double tap to like work correctly 2020-05-22 18:47:12 +02:00
Andrew Dobis 68cdb880a4
Added double tap likes (#211)
* fixed visual dark mode bug

* added double tap liking

* fixed conflict with sensitive media

* removed old test that is no longer relevant
2020-05-22 12:19:24 +02:00
mjaillot f95f72aeae
Handled HTML in profile descriptions (#204) 2020-05-21 22:39:51 +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
mjaillot 5b0a344236
WIP: Translatable text (#164)
* Extracted all visible texts

* Unit test import

* Removed conflicting import

* Removed unit tests that are no longer valid

* Added tests

* Renamed string

* Fixed string

* Added strings descriptions

* Converted string to templates
2020-05-21 15:22: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
Samuel Dietz 5fadfd2e8e
Sensitive media (#162)
* utility functions to censor and decensor a post image

* added Text warning about sensitive content

* adapt layout based on Sensitive attribute, censor and decensor

* try to perform clicks on sensitive image

* small refactor of status for sensitive layout

* testing censor Matrices functions

* perform test on sensitive post

* modified so second post is sensitive

* hide sensitiveWarning from albums for now

* hide totaly the image

* perform visibility check on sensitive warning textView

* deleted tests using activityScenario.onActivity as they return true on assert(false)

* commented dummy test for matrix censoring

* implemented sensitive layout for multiple pictures posts

* remove diplay check before click

* now testing visibility of textView

* deleted faulty lines i hope

* bring back dummy check for matrices

* everything is now sensitive, testing on tab post

* implemented matcher for second item

* implemented tests for tabs and classic sensitive layout using custom matcher Second

* cleaning in JSON values, put sensitive true on posts

* hide sensitive posts behind red triangle

* centered background triangle

* corrected indentation

* extracted sensitive string in string.xml
2020-05-16 23:47:18 +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
Andrew Dobis b873a90a9e
Added public timeline (#134)
* added public timeline

* WIP fixing date

* added test for the Public timeline

* added tests for the public timeline

* took pr comments into account
2020-05-03 22:48:05 +02:00
Wv5twkFEKh54vo4tta9yu7dHa3 663d0e2599
Discover feature (#143)
* Discover feature

* Add refresh handler

* Add json to mockserver

* singleton mock server, fix null items

* Add test to open discover post
2020-05-03 14:30:01 +02:00
mjaillot 0df369d88c
My profile from drawer (#125)
* Refactor profile as Activity

* Profile info in drawer + tests

* Fixed usernames and post scroll

* Updated username test

* Default avatar drawer

* Fixed avatar drawer

* Correction getUserName

* Fixed get username

* Small refactors for codeclimate

* Uncomment test

* adapted test to new modifications made on this branch
2020-05-01 11:26:18 +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
Ulysse Widmer db594bbda2
share pictures across apps (#129)
* share implemented

* added test for share intent
2020-05-01 09:01:13 +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 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
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
mjaillot 3506f034d4
Follow button and followers list (#109)
* wip follow button

* Fixed follow api typo

* Changed follow button text

* FollowButton click animated

* Fixed follow button

* FollowButton hidden if not ready

* Added toats

* Removed useless val

* Refactored follow onClickListener

* Merge with master

* Followers list WIP

* Distinguish followers and following

* Fixed typo

* Open followers list

* Follows list done

* Tests failing

* Fixed follow button test

* Completed url followers

* Fixed tests

* Added test
2020-04-24 12:10:25 +02:00
Andrew Dobis 5decd6ae12
Fixed crash when post doesn't contain media_attachments (#113) 2020-04-23 21:11:30 +02:00
Wv5twkFEKh54vo4tta9yu7dHa3 94635f5b72
Add splash screen to avoid white screen while opening (#112) 2020-04-23 19:49:30 +02:00
Andrew Dobis 2339fb0967
Added handling of multiple images in a post (#111)
* 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

* added handling of multiple images in a post

* Tweak tests

* Typo in test

* Add scrolls to make tests pass on small screens

* fixed old JSON in mockserver

* fixed linter issue

* merged with master again

* added test for albums

Co-authored-by: Matthieu <61561059+Wv5twkFEKh54vo4tta9yu7dHa3@users.noreply.github.com>
2020-04-23 18:49:32 +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
Wv5twkFEKh54vo4tta9yu7dHa3 7318ff5083
tweak UI, add mascot and info link to LoginActivity (#106)
* tweak UI, add mascot and info link to LoginActivity

* Fix test, add other test
2020-04-16 12:46:40 +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
Wv5twkFEKh54vo4tta9yu7dHa3 8af19cbd9a
Hide keyboard on clicking connect (#103) 2020-04-10 16:12:03 +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
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
Matthieu 5d975bb0aa remove files that shouldn't have been added back in from merge 2020-04-03 07:39:28 +02:00
Wv5twkFEKh54vo4tta9yu7dHa3 17c74dd430
Merge branch 'master' into scroll_load 2020-04-03 07:33:22 +02:00
Matthieu 8873b5692f github is being weird 2020-04-02 22:28:39 +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
Wv5twkFEKh54vo4tta9yu7dHa3 ece6716e2d
Merge branch 'master' into loading 2020-03-31 13:07:35 +02:00
Ulysse Widmer 35d11512c1 swipe tests that try all the horizontal swipe motions 2020-03-30 17:37:23 +02:00
Matthieu 0a3cd85d83 Add loading indications, refactor fragments into common parent class 2020-03-21 18:12:00 +01:00
Ulysse Widmer ac9a9943ac Merge branch 'master' into feature/upload-pictures 2020-03-20 16:23:38 +09:00
Ulysse Widmer e17a279994 add tests 2020-03-20 15:27:52 +09: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
Ulysse Widmer 0b681d9b6b Merge branch 'master' into feature/upload-pictures 2020-03-18 01:19:04 +09:00
Ulysse Widmer 2a1b9209e1 upload picture implemented
still need to link it with create a post and DataBase
2020-03-18 01:09:39 +09:00
Wv5twkFEKh54vo4tta9yu7dHa3 d0195bfe1b
Fix build and switch to Home timeline (#59)
* Switch to Home timeline

* Fix broken tests

* DRY-ed up the tests, remove extraneous activity
2020-03-17 15:14:19 +01:00
Andrew Dobis 7b5049bba9
As a user I want to be able to see posts in a feed (#28)
* Got posts working and linked them to the profile

* added tests for Post

* layout changes

* moved a test file

* refactoring

* refactoring

* 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

* rebased from master

* 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

* rebased from master

* 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

* fixed another merge problem

* trying my best to merge

* removed drawable definition in activity_post.xml

* implements swipe motion

add a new class to implement swipe motion
add the swipe right from home page to display settings
passed the homepage in a fragment

* transform profile activity into fragment

transformed profile activity and layout into fragment
linked it with a swipe motion

* Implement swipeable tabs

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

* Started converting Post to a fragment

* got a working feed

* WI

* removed non-valid 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

* 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)

Co-authored-by: Matthieu <61561059+Wv5twkFEKh54vo4tta9yu7dHa3@users.noreply.github.com>
Co-authored-by: Ulysse Widmer <ulysse.widmer@epfl.ch>
2020-03-16 09:38:35 +01:00
mjaillot 8802bf9905
My profile (#46)
* Layout of my-profile page

* implements swipe motion

add a new class to implement swipe motion
add the swipe right from home page to display settings
passed the homepage in a fragment

* transform profile activity into fragment

transformed profile activity and layout into fragment
linked it with a swipe motion

* Implement swipeable tabs

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

* Added constraint view

* Layout of my-profile page

* Added constraint view

* Rebase myProfile with login-flow

* 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 myProfile fragment to main activity + edit link

* Layout of my-profile page

* Added constraint view

* Layout of my-profile page

* Added constraint view

* Rebase myProfile with login-flow

* Added myProfile fragment to main activity + edit link

* Working tests for MyProfile

Co-authored-by: Ulysse Widmer <ulysse.widmer@epfl.ch>
2020-03-13 12:17:17 +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
Sanimys 2d7020fd21
Added a database working in LRU (#43)
Co-authored-by: Joachim Dunant <joachim.dunant@epfl.ch>
2020-03-12 23:27:40 +01:00
Ulysse Widmer de314dc9de
Implements swipe motion & fragmentalize (#41)
* implements swipe motion

add a new class to implement swipe motion
add the swipe right from home page to display settings
passed the homepage in a fragment

* transform profile activity into fragment

transformed profile activity and layout into fragment
linked it with a swipe motion

* refactor settings drawer tests

* added more tests and refactored some files

* added animations to the sliding of the swipe motion
2020-03-12 22:23:25 +01:00
Joachim Dunant 26427d5377 Added tests for settings 2020-03-08 20:41:01 +01:00
Matthieu 1d13b5e621 Move settings to activity, remove upper bar 2020-03-08 12:54:18 +01:00
Ulysse Widmer edbf3aafa7 resolved conflicts before merge 2020-03-08 19:17:26 +09:00
Wv5twkFEKh54vo4tta9yu7dHa3 f0d5f918e2
Merge branch 'master' into oath 2020-03-07 19:02:45 +01:00
Matthieu 34f19810bc Simplify failedregistration calls 2020-03-07 18:31:58 +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 33f0711b1f Finish authentication 2020-03-06 18:24:20 +01:00
Matthieu 6d45cde9f7 Move into setContent function 2020-03-06 11:52:29 +01:00
Ulysse Widmer faf5a0838b fixing some more cancer 2020-03-06 19:19:14 +09:00
Matthieu b214238457 Remove extraneous spaces 2020-03-06 09:00:18 +01:00
Matthieu d0ca08391b Add button to main activity to start a login process 2020-03-06 08:49:26 +01:00
Matthieu 0892ff536f Fix dependencies for custom tab 2020-03-06 08:37:59 +01:00
Matthieu 033c4843a2 Move default case to layout xml 2020-03-06 00:28:54 +01:00
Matthieu 463e3fce32 Remove changes from other PR 2020-03-06 00:24:43 +01:00
Matthieu 30339763ef undo formatting change in Application 2020-03-06 00:19:36 +01:00
Matthieu 1b6978ab59 undo formatting changes 2020-03-06 00:18:27 +01:00
Matthieu 25c2a211a6 Remove PostActivity 2020-03-06 00:15:42 +01:00
Matthieu 03ec30ef28 Remove useless network requests, change names 2020-03-06 00:11:12 +01:00
mjaillot e662351b56 Saved test using button on MainActivity 2020-03-05 23:15:22 +01:00
mjaillot 9bcf715a88 Tests for the profile page's textViews 2020-03-05 23:10:33 +01:00
Joachim Dunant 2f9b458dd7 Merge 2020-03-05 22:54:28 +01:00
Joachim Dunant f87998c0ca Refactored MainActivity for the initialization of fragments from the drawer 2020-03-05 22:49:16 +01:00
Andrea Clement d2a6a94bb3 can connect to pixelfed instance but no handled 2020-03-05 22:46:40 +01:00
Sanimys 10ee546ab9
Merge branch 'master' into settingsUI 2020-03-05 22:06:49 +01:00
Joachim Dunant 0ec320792a Cleaned code in fragments, Manifest, gradle build and MainActivity 2020-03-05 21:48:25 +01:00
mjaillot 02db1aa116 Merge 2020-03-05 21:27:20 +01:00
Joachim Dunant e7e3d19475 First implementation of settings UI & Main menu drawer 2020-03-05 21:07:10 +01:00
mjaillot 523d50a3a6 Convert avatar's URL to ImageView 2020-03-05 20:37:28 +01:00
Andrea Clement 5a6de98dc6 added function to obtain token 2020-03-05 20:36:49 +01:00
Andrea Clement 153e87b27b start of connection flow 2020-03-05 20:36:23 +01:00
Andrea Clement a989409433 add new API object for authentification 2020-03-05 20:34:48 +01:00
Matthieu 14197355c1 Add application registration endpoint to API 2020-03-05 19:08:57 +01:00
Andrea Clement 55d1d778b0 initial login files ; login flow class 2020-03-05 19:02:22 +01:00
Andrea Clement 85e1db49ca deleted login template 2020-03-05 18:59:46 +01:00
mjaillot 72f95f70b9 Merge 2020-03-05 18:38:10 +01:00
Andrew Dobis 7799ba4956 WIP on post 2020-03-05 18:29:10 +01:00
Andrew Dobis 8a026d0bd4 renamed pdf 2020-03-05 18:29:10 +01:00
Matthieu 6809bb1d25 Add elements of the API 2020-03-05 18:26:03 +01:00
Matthieu b3e4525e85 implement a lot of the API, a lot of the plumbing that is required 2020-03-05 18:23:23 +01:00
Andrea Clement 746b670403 inital login activity 2020-03-05 16:46:18 +01:00
mjaillot 3f508b3a27 First draft of the profile page 2020-03-04 19:32:41 +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
Matthieu a63c7ccb97 Switch to Kotlin 2020-02-28 17:08:54 +01:00
Ulysse Widmer b10a800b36 init project files 2020-02-28 00:36:26 +01:00