Commit graph

272 commits

Author SHA1 Message Date
Konrad Pozniak
dbdc597207
fix bug where home timeline was never showing "load more" button (#729) 2018-07-25 21:50:09 +02:00
Konrad Pozniak
7f648b1acd
improve dependency injection (#723) 2018-07-23 21:59:10 +02:00
Conny Duck
67f4479e86 fix some lint warnings, use kotlin view imports in ModalTimeLineActivity 2018-07-23 15:18:33 +02:00
Konrad Pozniak
aa5eb9f99a
increase cache size & dont cache full size media (#710) 2018-07-14 17:12:57 +02:00
Conny Duck
6f179fccaa fix crash in TimelineFragment 2018-07-12 21:21:53 +02:00
Conny Duck
4df93c49cb fix crash in AccountMediaFragment (again) 2018-07-09 08:59:06 +02:00
Conny Duck
b7da5f7a29 fix another crash in ViewThreadFragment 2018-07-08 19:21:19 +02:00
Conny Duck
26529b19d5 fix crash in AccountMediaFragment 2018-07-08 11:41:08 +02:00
Conny Duck
67f90d050c fix crash in TimelineFragment 2018-07-08 10:16:19 +02:00
Conny Duck
b2c0ed69f6 fix crash in ViewThreadFragment 2018-07-07 12:09:15 +02:00
Conny Duck
ef9e931428 fix regex filter not affecting spoilertext 2018-07-05 21:59:38 +02:00
Conny Duck
c452b8f281 Merge branch 'master' of https://github.com/Vavassor/Tusky 2018-07-05 21:36:16 +02:00
Conny Duck
d900e1d8cd fix crash in TimelineFragment 2018-07-05 21:32:49 +02:00
Conny Duck
28940169c6 enable custom emoji fonts for all api levels again 2018-07-05 21:14:32 +02:00
Ivan Kupalov
8c20d5dd93 Fix crash on receiving event in timeline (#704) 2018-07-02 22:12:27 +02:00
Conny Duck
3410fad62c only disable emoji fonts on Lollipop and lower 2018-07-01 14:35:11 +02:00
Konrad Pozniak
030a201da6
disable emoji fonts on Android 5 (#698) 2018-07-01 10:18:00 +02:00
Conny Duck
77617ba9bf fix crash on timeline reloading 2018-06-25 18:20:45 +02:00
Conny Duck
b655985997 only reload timeline on pref change when necessary 2018-06-25 17:20:41 +02:00
Conny Duck
50b0d1fb8d cleanup code 2018-06-25 14:49:00 +02:00
Ivan Kupalov
570d7e3597 Do not scroll to top on timeline refresh (#681)
* Do not scroll to top on timeline refresh

* Use dp for shifting timeline
2018-06-24 10:53:19 +02:00
Konrad Pozniak
63f9d99390
Account activity redesign (#662)
* Refactor-all-the-things version of the fix for issue #573

* Migrate SpanUtils to kotlin because why not

* Minimal fix for issue #573

* Add tests for compose spanning

* Clean up code suggestions

* Make FakeSpannable.getSpans implementation less awkward

* Add secondary validation pass for urls

* Address code review feedback

* Fixup type filtering in FakeSpannable again

* Make all mentions in compose activity use the default link color

* new layout for AccountActivity

* fix the light theme

* convert AccountActivity to Kotlin

* introduce AccountViewModel

* Merge branch 'master' into account-activity-redesign

# Conflicts:
#	app/src/main/java/com/keylesspalace/tusky/AccountActivity.java

* add Bot badge to profile

* parse custom emojis in usernames

* add possibility to cancel follow request

* add third tab on profiles

* add account fields to profile

* add support for moved accounts

* set click listener on account moved view

* fix tests

* use 24dp as statusbar size

* add ability to hide reblogs from followed accounts

* add button to edit own account to AccountActivity

* set toolbar top margin programmatically

* fix crash

* add shadow behind statusbar

* introduce ViewExtensions to clean up code

* move code out of offsetChangedListener for perf reasons

* clean up stuff

* add error handling

* improve type safety

* fix ConstraintLayout warning

* remove unneeded ressources

* fix event dispatching

* fix crash in event handling

* set correct emoji on title

* improve some things

* wrap follower/foillowing/status views
2018-06-18 13:26:18 +02:00
Ivan Kupalov
c450af7b0d Fix account media progress indicator (#684)
* Fix account media progress indicator

* Use Kotlin Android ext in AccountMediaFragment
2018-06-17 21:49:51 +02:00
Paul
30856a2f82 Enable boosting of own private toots, closes #664 (#666) 2018-05-28 21:29:06 +02:00
Ivan Kupalov
3756a1fd20
Add EventHub, add fav, reblog events, improve timelines (#562)
* Add AppStore, add fav, reblog events

* Add events, add handling to Timeline

* Add event handling to Notifications

* Mostly finish events

* Fix unsubscribing

* Cleanup timeline

* Fix newStatusEvent in thread, fix deleteEvent

* Insert new toots only in specific timelines

* Add missing else

* Rename AppStore to EventHub

* Fix tests

* Use DiffUtils for timeline

* Fix empty timeline bug. Improve loading placeholder

* Fix AsyncListDiff, loading indicator, "load more"

* Timeline fixes & improvements.

Fix infinite loading. Remove spinner correctly.
Don't refresh timeline without need.
2018-05-27 11:22:12 +03:00
Conny Duck
41743b0dca fix crash in SearchFragment 2018-05-14 18:23:33 +02:00
Ivan Kupalov
23d84dfa66 Show image descriptions in gallery (#630)
* Add circleci

* Commit to maybe fix ci

* Suppress false positives in lint

* Disable linting for tests in ci

* Add image descriptions to gallery

* Fix test

* [CI] Attempt to fix OOM error

* [CI] Attempt to fix OOM error, 2

* Add option to open status from media

* fix theme issue

* increase linespacing on media description
2018-05-10 20:13:25 +02:00
Konrad Pozniak
27b4cf8739
1.8 fixes (#637)
* fix lint warnings

* upgrade dependencies

* auto cancel notifications

* improve dependency injection

* fix tests

* remove old comment from BaseActivity

* fix missing injectors
2018-05-08 19:15:10 +02:00
Konrad Pozniak
a2bfef3101
move bottom sheet from fragments to activities (#628)
* move bottom sheet from fragments to activities

* move BottomSheetLogic to dedicated abstract Activity

* change tests

* improve code
2018-05-06 22:05:54 +02:00
Levi Bard
0aeab2a983 Add tests for search functionality in SFragment (#617)
* Add tests for search functionality in SFragment

* Parameterize url matching tests

* Clean up / compartmentalize search tests

* Make SFragmentTest filesystem location match package name
2018-05-02 23:43:12 +03:00
Konrad Pozniak
5cfe6f8fa5
make search find statuses (#613) 2018-04-30 11:30:10 +02:00
Conny Duck
d90a011561 fix proxy settings 2018-04-30 10:34:38 +02:00
Konrad Pozniak
89f93eab85
Fix SparkButtons (#608)
* fix the SparkButtons

* dont notify adapter after boost/fav
2018-04-28 22:59:46 +02:00
Ivan Kupalov
f3c6abdd4d Add expand/collapse button for threads (#609) 2018-04-28 16:17:01 +02:00
Levi Bard
76eae44324 View links to statuses inside Tusky (#568)
* View links to statuses inside Tusky

* Only attempt to open links that look like mastodon statuses

* Add support for pleroma statuses

* Move "smells like mastodon" url check to click handler

* Add bottom sheet to notify users of post query status

* Improve architecture for managing search status

* Push everything into SFragment

* Add external lookup for non-locally-resolved account links

* Clean up copypasta from LinkHelper.setClickableText

* Apply PR feedback

* Migrate bottom sheet wrappers to CoordinatorLayout
2018-04-25 20:04:55 +02:00
Konrad Pozniak
b4ba457d89
Dependency injection improvement (#596)
* inject MastodonApi into LoginActivity

* inject AccountManager into MainActivity

* inject AccountManager into SplashActivity, convert to Kotlin

* inject AccountManager into AccountActivity

* inject AccountManager into LoginActivity

* inject AccountManager into NotificationsFragment and NotificationClearBroadcastReceiver, fix MainActivity

* ooops

* use same OkHttpClient for Retrofit & Picasso

* fix ordering of okhttp interceptors

* remove dependencies on TuskyApplication

* bugfix
2018-04-22 17:20:01 +02:00
Conny Duck
b621f8f78d fix bug where sometimes mentions where duplicated when replying 2018-04-17 19:06:28 +02:00
Konrad Pozniak
27eefbf65a
ComposeActivity improvements (#548)
* do not add media urls to status text

* add scrolling to content

* add arrow icon and animation to replying-to toggle

* remove unnecessary compose_button_colors.xml

* improve toot button

* improve bottom bar, add bottom sheet for compose options, dedicated cw button

* fix crash on Android < API 21

* move media picking from dialog to bottom sheet

* add small style tootbutton

* fix colors/button background for light theme

* add icons to media chose bottom sheet

* improve hide media button, delete unused styles

* fix crash on dev build when taking photo

* consolidate drawables

* consolidate strings and ids, add tooltips to buttons

* allow media only toots

* change error message to show max size of upload correctly

* fix button color

* add emoji

* code cleanup

* Merge branch 'master' into compose_activity_refactoring

# Conflicts:
#	app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java

* fix hidden snackbar

* improve hint text color

* add SendTootService

* fix timeline refreshing

* toot saving and error handling for sendtootservice

* restructure some code

* convert EditTextTyped to Kotlin

* fixed pick media button disabled color

* force sensitive media when content warning is shown

* add db cache for emojis & fix tests

* reorder buttons to match mastodon web

* add possibility to cancel sending of toot

* correctly delete sent toots

* refresh SavedTootActivity after toot was sent

* remove unused resources

* correct params for toot saving in SendTootService

* consolidate strings

* bugfix

* remove unused resources

* fix notifications on old android for SendTootService

* fix crash
2018-04-13 22:37:21 +02:00
Gareth Murphy
6d6c9575c4 Add regular expression feed filtering (#557)
* Initial implementation of regex feed filtering

Mimics Mastodon web's functionality, but in a simpler form; a single
regular expression is shared across the home, local and federated feeds.

Strings are currently only provided in English and will need to be
translated.

* Fix buggy behaviour on filter regex update

* Validate regex filter input

Fixes buggy behaviour on inputting a regular expression feed filter by
testing the expression continuously as the user types, displaying an
error and disabling the 'OK' button of the dialog at any time it's not a
valid regular expression. Disables spelling suggestions in the input to
make the experience less frustrating and error prone.

Also fixes some generally buggy behaviour upon preference change,
specifically in cases where no Matcher was set prior to a new pattern
being set, which would cause the app to crash.

* Apply regex filter to spoiler text

* Get rid of empty catch block in regex filter code

* Make regex filter error string translatable
2018-04-05 22:58:44 +02:00
Ivan Kupalov
a5cffe0fea Add Dagger (#554)
* Add Dagger DI

* Preemptively fix tests

* Add missing licenses

* DI fixes

* ci fixes
2018-03-27 19:47:00 +02:00
Conny Duck
720f7c6a0c fix issue where scrolling wont stop after jumping to top 2018-03-17 19:46:01 +01:00
Ivan Kupalov
28e46c9cc0 Add ComposeActivity tests. Add ServiceLocator (#542) 2018-03-09 22:02:32 +01:00
Conny Duck
4e617dccc7 change the color of all SwipeRefreshLayouts to match the Tusky theme 2018-03-09 20:39:08 +01:00
Conny Duck
44b79e31d4 fail silently when status card cannot be loaded for compatibility with Pleroma 2018-03-09 18:56:05 +01:00
Konrad Pozniak
71954a277e
convert entity classes to Kotlin data classes (#526)
* convert entity classes to Kotlin data classes

* more data classes, code style
2018-03-03 13:24:03 +01:00
Conny Duck
fec1dbc470 fix link header handling in AccountActivityFragment
- fixes douplication of users after undoing unblocks/unmutes
- removes unnecessary loading when scrolled to end of list
2018-03-02 20:56:09 +01:00
Conny Duck
5dbe3c927e fix timeline filtering not working after app restart 2018-02-08 19:12:02 +01:00
Conny Duck
9b6ca7ff42 remove unused resources 2018-02-03 23:43:06 +01:00
Konrad Pozniak
92ae463b38
Multi account feature (#490)
* basic implementation

* improve LoginActivity

* darken drawer background image

* add current avatar in ComposeActivity

* add account name to logout dialog

* multi account support for notifications

* multi account support for notifications

* bugfixes & cleanup

* fix bug where somethings notifications would open with the wrong user

* correctly set active account in SFragment

* small improvements
2018-02-03 22:45:14 +01:00
remi6397
11105f4aac Theming improvements (#502)
* Split theme definitions into day and night

* Add support for Night Mode in code

* Add theme chooser in preferences

* Fix translations

* Adjust IDs

* Adjust preferences for custom themes

* UI tweaks for custom theme support

* Added code for custom theme support 🍅

* Fixed resource display in Kotlin 🍅

* Restored styles

* Updated strings

* Fixed getIdentifier() to fit into setTheme()

* Removed redundant resources

* Reset default theme to "Dusky"

* Fixed night mode handler to maintain compatibility

* Refactor functions to use helper methods

* Added license block

* Added preview to theme selector

* Added color identifier getter helper method

* Fixed reference in AccountMediaFragment

* Cleanup

* Fixed navbar foreground not changing color

* Fix fallback theme switch(){}

* Enable location-based daylight trigger

* Cleanup

* Modified theming strategy to reduce clutter in preferences

* Updated translations for latest version

* Removed "Default" theme flavor from settings

* Updated Polish translations 🇵🇱

* Modified TwilightManager handling code to support Android M's UiModeManager features and moved it to its own function

* Updated Polish translations 🇵🇱

* Cleanup; Fixed hardcoded string

* Added missing escape in string

* Removed permission request dialog.

As we now use native UiModeManager APIs that don't need special permission for Android 6.0 and above, we no longer need to bother user with Android M+ specific location permission request dialog.

* Increased readability of ThemeUtil class

* Refactored ThemeUtils.setAppNightMode method

* Cleanup
2018-01-20 13:39:01 +01:00
Ivan Kupalov
6152043df3 Add basic lists support (#501) 2018-01-06 19:01:37 +01:00
Sergio López
7c83e0f87d implement support for HTTP proxy (#489)
This change allows the user to manually enter an unauthenticated proxy
configuration to be used for all API connections. This is mainly
intended for using Tusky with Tor (via Orbot or a local proxy).
2017-12-26 21:45:08 +01:00
Conny Duck
7abd8c8d70 fix some lint warnings 2017-12-01 22:31:34 +01:00
Conny Duck
7cc1ed9844 fix problem with spark buttons behaving weirdly 2017-12-01 22:13:47 +01:00
Conny Duck
b33740d74e fix IndexOutOfBoundsException in ViewThreadFragment 2017-11-30 21:04:47 +01:00
Konrad Pozniak
41233a837b
UI Improvements (#445)
UI Improvements
2017-11-30 20:12:09 +01:00
Ivan Kupalov
2575b16dad Save reply info in draft, refactor (#449)
* Save reply info in draft, refactor

* Handle replying to deleted status
2017-11-16 19:18:11 +01:00
Konrad Pozniak
3204223af7
fix clear notifications crash (#458) 2017-11-15 21:18:35 +01:00
Ivan Kupalov
ddc4954f8a Cancel notifications on opening notifications tab (#450) 2017-11-13 19:05:23 +01:00
Conny Duck
dec7da9655 upgrade to API Level 27, fix nullability problems with new support library 2017-11-09 14:35:52 +01:00
Conny Duck
97546e79d9 fix a bug where a thread was not shown completely 2017-11-09 10:08:52 +01:00
Conny Duck
f35ff105e9 fix crash when AccountMediaFragment was recreated 2017-11-07 23:33:17 +01:00
Conny Duck
59bcb6f0bf fix bug where account timeline showed only media toots 2017-11-07 23:06:06 +01:00
charlag
92fb55cb3a Open status from notifications 2017-11-07 22:36:19 +03:00
Conny Duck
305d28a5c1 fix some lint warnings, remove unused code 2017-11-07 15:31:44 +01:00
Conny Duck
3053e097a7 upgrade room library to 1 (fix merge problem) 2017-11-07 13:12:57 +01:00
Konrad Pozniak
21de60f739
Merge branch 'master' into timeline-improvement 2017-11-07 13:03:49 +01:00
Conny Duck
52dd9559d6 fix placeholder not resetting itself after a load failed 2017-11-07 12:59:46 +01:00
charlag
74d6736afc Make status placeholder abstraction cleaner 2017-11-07 12:44:19 +01:00
charlag
0dede1ba7d Make more clear representation of placeholder in notifications 2017-11-07 12:44:19 +01:00
Ivan Kupalov
dc1a60cc12 Implement media tab (#430) 2017-11-05 22:32:36 +01:00
Conny Duck
80a10c1ac1 implement "load more" placeholder 2017-11-04 21:57:30 +01:00
Conny Duck
51c547ffb0 fix an error where opening notifications would lead to the wrong status 2017-11-04 13:25:37 +01:00
Ivan Kupalov
62f4837135 Reply improvements (#432)
* Refactor ComposeActivity intent. Fix bug with URLs

When user saved toot link was removed from the text field itself,
not only from the text to be saved.

* Show what you reply to

Closes #119
2017-11-01 20:59:29 +01:00
Conny Duck
93fcd33c48 add actionbar to PreferencesActivity 2017-10-30 10:41:59 +01:00
Conny Duck
671957da5a title and menu to open toot in browser for ViewThreadActivity 2017-10-28 21:59:33 +02:00
Conny Duck
9dd09d0522 fix a bug where favs & reblogs where not shown correctly in NotificationsFragment 2017-10-27 23:39:36 +02:00
Konrad Pozniak
5cbc7217ff Link previews for detail statuses (#424)
* implement link preview cards on detail statuses

* cleanup code
2017-10-27 13:20:17 +02:00
Conny Duck
00c5a975d6 close ViewThreadActivity if the main status got removed to avoid crashes on subsequent refreshes 2017-10-24 23:33:05 +02:00
Conny Duck
8e44348f46 create notification channels ahead of time so users can edit the settings before a notification was issued 2017-10-21 21:28:05 +02:00
Conny Duck
30312e0e55 implement notification channels, use system notification settings on android Oreo 2017-10-18 22:18:07 +02:00
Conny Duck
f2f3be37b3 cleanup code, remove some unneeded files 2017-10-18 00:20:50 +02:00
Konrad Pozniak
1297a35e9b Merge pull request #386 from lenchan139/master
add option: always show all sensitive content without warning
2017-10-17 09:44:19 +02:00
flyingrub
4fb9ee99f6 Add a menu entry to copy the link of a toot
fixes #390
2017-09-25 20:15:04 +02:00
Len Chan
c0a5e55f47 add option: always show all sensitive content without warning 2017-09-19 23:19:18 +08:00
Conny Duck
f696b6e8d3 bugfix, layout improvements 2017-08-05 12:04:40 +02:00
Conny Duck
099d76d919 make FAB hide on scroll in AccountActivity as well 2017-08-04 11:44:10 +02:00
Vavassor
309c89eefc Makes the main status of a thread appear as a more detailed view. 2017-08-03 00:29:31 -04:00
Vavassor
e5deac0fa9 Addendum to commit 30d7f269de to cancel the callbacks so they're not called after the fragment is detached. Closes #357 2017-07-25 17:35:36 -04:00
Vavassor
3f8378ae3a Fixes a crash when a timeline or thread is backgrounded and brought back with an uninitialized notification or status list. 2017-07-20 21:17:36 -04:00
Vavassor
30d7f269de Fixes an intermittent null pointer exception caused by getActivity() returning null in callbacks. 2017-07-18 23:34:07 -04:00
Ivan Kupalov
08f928a2b2 Improve media browser and video viewer
* show/hide status bar by tapping a photo
* dim and color status bar in video/media viewers
* show/hide status bar in video viewer
* use shared element transition when opening a photo is possible
* center video in VideoView
2017-07-15 18:37:53 +03:00
Vavassor
87600b016f Removes unused icons and does bits of cleanup. 2017-07-14 23:23:14 -04:00
Vavassor
96cba0cc2b Fixes timelines and notifications tabs fetching progressively further down when they are restarted. 2017-07-14 17:09:44 -04:00
Henri Gourvest
0945b881f5 avoid crash when new notification list is empty 2017-07-14 11:11:38 +02:00
Vavassor
a23cca7047 Re-does commit 5754a3a177 because those changes were stomped by merging in commit fc1a24be11. 2017-07-13 21:39:17 -04:00
Vavassor
fc1a24be11 Resolves merge conflicts and makes NotificationAdapter no longer implement AdapterItemRemover 2017-07-13 21:31:31 -04:00
Ivan Kupalov
90c1a83ba4 Preserve status states on updates. UI layer refactoring.
Some things were pulled out of adapters to fragments. New classes were introduced - StatusViewData and NotificationViewData. They not only have view state in them but also help decoupling.
Because introducing parallel model list requires a lot of synchronisation PairedList was added.
Also synchronisation between fragments and adapters is quiet tedious and error-prone and should be replaces with better solution.
Oh, I also couldn’t resist and fixed bug with buttons animation in the same commit.
2017-07-13 22:18:08 +03:00
Ivan Kupalov
0f15509345 Add boost click handling 2017-07-02 09:55:20 +03:00
Vavassor
afa21f5a5c Makes end of list footers have zero height. 2017-07-01 23:23:42 -04:00
Vavassor
275cd51a6d Adds correct footer behaviour to account lists and unifies it with how timelines use them. 2017-06-30 18:30:25 -04:00
Vavassor
3955649b9c Moves loading of accounts, notifications, and statuses to use link headers. Also remedies an issue where duplicate calls for the same chunk of items in a list can occur. 2017-06-30 02:31:58 -04:00
Vavassor
0a7eaadda1 Adds the mention to whom is being replied first, before other mentions in a thread, rather than after them. 2017-06-26 18:10:01 -04:00
Vavassor
1dc9c87c2e Fixes public visibility being disabled when replying, and changes the default to public like non-reply posts. 2017-06-26 15:46:03 -04:00
Vavassor
3f54ead962 Adds option to hide media previews if reduced data usage is desired Closes #56. 2017-06-26 05:15:47 -04:00
Vavassor
e3745ebd6b Adds ability to page between multiple images in a status by swiping from left to right. Closes #66 2017-06-25 01:07:41 -04:00
Vavassor
b1aa05694e Removes ButterKnife annotations. 2017-06-22 14:59:12 -04:00
Vavassor
18ebfa212e Minor writing style changes. 2017-06-22 14:01:25 -04:00
Vavassor
a4ee128e26 Broadcasts now cause a refresh on timelines after a post is composed instead of listeners.
As a side effect, pagers don't have to keep track of "registered fragments", which was a bad idea and caused crashes.
2017-06-06 18:20:55 -04:00
Vavassor
9c56f0e7bc Broadcasts now used everywhere for signalling to remove accounts' posts instead of listeners. 2017-06-06 17:15:29 -04:00
torrentcome
2b9f19805f Merge branch 'master' into #136 2017-06-02 23:15:21 +02:00
Conny Duck
1a39e58d3c remove unnecessary Log utility class, replace Exception.printStackTrace with logging 2017-05-23 21:34:31 +02:00
torrentcome
0a6a2e44c2 (view) create package view 2017-05-15 12:07:01 +02:00
torrentcome
ed5564d4d5 (receiver) create package for receiver 2017-05-15 12:05:10 +02:00
Vavassor
66bac21236 fixes merge conflicts 2017-05-11 18:58:38 -04:00
Vavassor
68eaa742ee Merge branch 'Pangoraw-master' 2017-05-11 18:34:45 -04:00
Pangoraw
72ac4e5581 Allow broadcasting event across activities. 2017-05-11 09:11:15 +00:00
torrentcome
a015637785 (media) add toolbar and download button 2017-05-10 15:24:45 +02:00
Vavassor
3c20f7a0c4 Adds a splash screen replacement. 2017-05-09 22:36:05 -04:00
Vavassor
7f934e4f26 Resolves merge conflicts 2017-05-07 17:58:56 -04:00
Paul
fc2d039d63 Add loader when waiting to display a media 2017-05-06 11:30:52 +00:00
Vavassor
aa2394748c Reorganizes the whole codebase. 2017-05-04 18:55:35 -04:00