Commit Graph

748 Commits

Author SHA1 Message Date
Konrad Pozniak 0b60445256 Upgrade to AndroidX, move to MaterialComponents theme (#953)
* upgrade to AndroidX, upgrade libraries

* move to MaterialComponents theme

* make sure the compose button looks good everywhere

* fix tollbar title/button alignment on tablet

* move to new material color theming, consolidate colors and themes

* fix build, fix imports

* set error on TextInputLayout instead of EditText

* fix imports, TootButton when

* improve snackbar style

* fix task description color
2018-12-17 15:25:35 +01:00
Mélanie Chauvel (ariasuni) 95d4fc3428 Display mentions toot hidden (#954)
* WIP: still display mentions when toot content is hidden

* WIP: still display mentions when toot content is hidden (2)

* Still display mentions when toot content is hidden (3)

* Factorize code for setting content and spoiler on a toot

* Factorize condition
2018-12-16 10:30:40 +01:00
Conny Duck 852ed37ac7 fix crash when using quick compose tile 2018-12-13 22:29:12 +01:00
Mélanie Chauvel (ariasuni) 49a160aaec Fix a lot of easy-to-fix warnings (#957) 2018-12-12 20:28:05 +01:00
Conny Duck 27a09a731a fix another crash in ViewImageFragment 2018-12-12 19:37:18 +01:00
Conny Duck 4d305b20ae fix crash in MediaUtils.getVideoThumbnail 2018-12-12 18:56:42 +01:00
Konrad Pozniak 80afc5f0fd Improve emoji picker accessibility (#944)
* set emoji shortcode as content description on ImageView

* hide bottom sheets on back press
2018-12-07 17:05:02 +01:00
Conny Duck a41078ce72 fix crash in EditProfileActivity 2018-12-06 22:34:36 +01:00
Conny Duck 716cf0667b close drawer when clicking on own profile and adding account
closes #948
2018-12-05 22:37:04 +01:00
Conny Duck 9d5cc095b8 show correct username of author when sharing toot content
closes #918
2018-12-03 15:22:51 +01:00
Konrad Pozniak 1fdfbf631d remove unnecessary compat code (#932) 2018-12-03 11:22:57 +01:00
Konrad Pozniak 8ce4c697ce add checkmark to verified links and better constraints to account fields (#922)
* add checkmark to verified links and better constraints to account fields

* address pr feedback
2018-12-03 11:02:28 +01:00
Ivan Kupalov aac934cf56 Apply suggestions for ProgressImageView (#942) 2018-12-03 11:02:07 +01:00
Billy Brawner 8858ead97e Add visibility icons to detail statuses (#901)
* Add visibility icons to statuses

* Remove visibility icons from timeline statuses

* Dynamically scale visibility icon according to timestamp font size

* Remove visibility icon selection logic from Status model

* Migrate visibility icon logic to StatusDetailedViewHolder

* Simplify/improve performance of visibility icon layout

* Use text size for visibility icon size (instead of view size)

* Remove unnecessary LayoutListener

* Remove unnecessary visibilityIcon check
2018-11-28 19:46:10 +01:00
Conny Duck 715573361d fix NullPointerException in ViewImageFragment 2018-11-27 21:18:21 +01:00
Conny Duck d58041773a fix crash in ComposeActivity when loading no Emojis 2018-11-27 21:07:15 +01:00
Conny Duck 8884354999 fix NullPointerException in ViewImageFragment 2018-11-25 20:16:38 +01:00
Conny Duck 08440aed6e fix activity restart after theme switch 2018-11-18 12:29:11 +01:00
Conny Duck 8b3dbf54a1 fix crash on unknown media type 2018-11-17 16:17:47 +01:00
Conny Duck 0531fc6902 update deps, fix some lint warnings 2018-11-16 13:31:03 +01:00
kyori19 d66858abe7 fix link's too large hitbox (#916)
* fix link's too large hitbox (tuskyapp#846)

* Use zero width space instead of normal space.

* Add comment.

* Remove unnecessary Html.fromHtml
2018-11-12 23:07:47 +01:00
Konrad Pozniak 70ca42c8b7 New settings (#891)
* change drawer items

* rename SettingsActivity

* introduce AccountSettings activity

* improve account settings, move notification settings

* sync settings with server

* rename settings back to preferences

* add functionality for settings

* move mediaPreviewEnabled preference to AccountPreferences

* replace shared prefs with accountmanager

* move PreferencesFragment to support library

* split preferences fragment into smaller fragments,
merge AccountPreferencesActivity into PreferencesFragment

* adjust icon size, add icons to general preferences

* change mediaPreviewEnabled and alwaysShowSensitiveMedia pref position

* add database migration

* remove pullNotificationCheckInterval option

* fix  preference in TimelineFragment

* Update Chinese translations. (#915)

* Update zh-CN translations.

* Update zh-SG translations.

* Update zh-TW translations.

* Update zh-MO translations.

* Update zh-HK translations.

* Fix errors in zh-CN translations.

* Fix errors in zh-SG translations.

* Fix errors in zh-TW translations.

* Fix errors in zh-MO translations.

* Fix errors in zh-HK translations.
2018-11-12 21:09:39 +01:00
Levi Bard 5c88edf276 Media description improvements (#898)
* Enforce 420-character limit on media descriptions in the UI

* Persist media descriptions with drafts

* Defer media description update until after upload finishes

* Make description field 2 lines for better visibility of hint text

* Reuse Gson instance

* Force retranslation of modified string "hint_describe_for_visually_impaired"

* Add bounds check when reading serialized media descriptions
2018-11-11 19:25:45 +01:00
kyori19 39e54c666e Do not show "Pin" in "more" menu of direct status. (#909) 2018-11-06 18:10:07 +01:00
kyori19 75678c5b2c Fix typo "accountUsename" to "accountUsername" (#908) 2018-11-06 18:03:10 +01:00
Levi Bard 506189ceed Filter emoji where "visible_in_picker" is set to false. (#907)
Addresses #770
2018-11-04 10:51:31 +01:00
Levi Bard e03482d759 Add menu item to copy media link (#895) 2018-11-01 15:13:37 +01:00
Levi Bard c05eaae317 Fix media transitions, reduce code duplication between media fragments (#894)
* Fix media transitions, reduce code duplication between media fragments

* Remove redundant helper

* Fix occasional crash when swiping between mixed media

* Hide controls when swiping between media
2018-11-01 14:52:22 +01:00
Levi Bard 88ad51ce61 Account for underscores when tokenizing mentions for autocompletion (#888)
* Account for underscores when tokenizing mentions for autocompletion
Fixes #743

* Migrate MentionTokenizer to kotlin

* Add tests for mention tokenizer
2018-10-19 17:44:46 +02:00
Levi Bard 1deaaa1144 Refactor media views (#866)
* Migrate ImagePagerAdapter to kotlin

* Migrate ViewMediaFragment to kotlin

* Make images and videos share the same activity/pager

* Show descriptions above videos

* Cleanup

* Address code review feedback

* Migrate media fragments to constraint layout
2018-10-15 19:56:11 +02:00
kyori19 fd0f5edeef Prevent multiple registrations to eventHub on same TimelineFragment (#879) 2018-10-15 19:47:50 +02:00
Levi Bard 37702f7f81 On android 6.0, filter 0x00ad (unicode soft hyphen) from statuses (#884)
Fixes #563
2018-10-15 19:47:10 +02:00
Levi Bard d58aa01fde Focus content warning field on activation (#883)
Fixes #773
2018-10-12 21:53:04 +02:00
Ivan Kupalov 449c7a3bad Show "remote profile" message. (#873)
* Show "remote profile" message. Closes #806

* Improve remote message look
2018-10-03 21:53:31 +02:00
Ivan Kupalov d928fe7a1d Add ability to pin/unpin statuses (#872) 2018-10-03 21:27:52 +02:00
Levi Bard 66b94e5397 Enable sharing media directly from Tusky (#852)
* Extract duplicated code into BaseActivity

* Migrate MediaUtils to kotlin

* Migrate ViewVideoActivity to kotlin

* Migrate ViewMediaActivity to kotlin

* Initial media sharing functionality

* Address code review feedback

* Make share icon match

* Address code review feedback
2018-10-01 11:50:17 +02:00
Prat 6e75e0bfc5 Add deletion confirmation (#865) 2018-10-01 08:50:48 +02:00
Konrad Pozniak 836b99966f style dark dialogs (#864) 2018-09-29 19:44:50 +02:00
Konrad Pozniak 062d54d19e small improvements for viewholders (#860) 2018-09-28 17:15:01 +02:00
Konrad Pozniak 36fdfb3de6 fix notifications loading (again) (#845)
* fix notifications loading (again)

* Revert "fix notifications loading (again)"

This reverts commit 226710fabf5175d4f6a2103c6896bcfe37e3230e.

* fix notification loading (this time for really real)
2018-09-28 17:14:37 +02:00
Levi Bard eb7459406a Make Tusky a share target for video (#857) 2018-09-28 17:11:32 +02:00
Conny Duck 95e507d489 fix RecentlyNonNull/Nullable warnings 2018-09-22 21:11:18 +02:00
HellPie 2730dca3ea Add support for collapsible statuses when they exceed 500 characters (#825)
* Update Gradle plugin to work with Android Studio 3.3 Canary

Android Studio 3.1.4 Stable doesn't render layout previews in this project
for whatever reason. Switching to the latest 3.3 Canary release fixes the
issue without affecting Gradle scripts but requires the new Android Gradle
plugin to match the new Android Studio release.

This commit will be reverted once development on the feature is done.

* Update gradle build script to allow installing debug builds alongside store version

This will allow developers, testers, etc to work on Tusky will not having to worry
about overwriting, uninstalling, fiddling with a preinstalled application which would
mean having to login again every time the development cycle starts/finishes and
manually reinstalling the app.

* Add UI changes to support collapsing statuses

The button uses subtle styling to not be distracting like the CW button on the timeline
The button is toggleable, full width to match the status textbox hitbox width and also
is shorter to not be too intrusive between the status text and images, or the post below

* Update status data model to store whether the message has been collapsed

* Update status action listener to notify of collapsed state changing

Provide stubs in all implementing classes and mark as TODO the stubs that
require a proper implementation for the feature to work.

* Add implementation code to handle status collapse/expand in timeline

Code has not been added elsewhere to simplify testing.
Once the code will be considered stable it will be also included in other
status action listener implementers.

* Add preferences so that users can toggle the collapsing of long posts

This is currently limited to a simple toggle, it would be nice to implement
a more advanced UI to offer the user more control over the feature.

* Update Gradle plugin to work with latest Android Studio 3.3 Canary 8

Just like the other commit, this will be reverted once the feature is working.
I simply don't want to deal with what changes in my installation of Android
Studio 3.1.4 Stable which breaks the layout preview rendering.

* Update data models and utils for statuses to better handle collapsing

I forgot that data isn't available from the API and can't really be built
from scratch using existing data due to preferences.
A new, extra boolean should fix the issue.

* Fix search breaking due to newly introduced variables in utils classes

* Fix timeline breaking due to newly introduced variables in utils classes

* Fix item status text for collapsed toggle being shown in the wrong state

* Update timeline fragment to refresh the list when collapsed settings change

* Add support for status content collapse in timeline viewholder

* Fix view holder truncating posts using temporary debug settings at 50 chars

* Add toggle support to notification layout as well

* Add support for collapsed statuses to search results

* Add support for expandable content to notifications too

* Update codebase with some suggested changes by @charlang

* Update more code with more suggestions and move null-safety into view data

* Update even more code with even more suggested code changes

* Revert a0a41ca and 0ee004d (Android Studio 3.1 to Android Studio 3.3 updates)

* Add an input filter utility class to reuse code for trimming statuses

* Update UI of statuses to show a taller collapsible button

* Update notification fragment logging to simplify null checks

* Add smartness to SmartLengthInputFilter such as word trimming and runway

* Fix posts with show more button even if bad ratio didn't collapse

* Fix thread view showing button but not collapsing by implementing the feature

* Fix spannable losing spans when collapsed and restore length to 500 characters

* Remove debug build suffix as per request

* Fix all the merging happened in f66d689, 623cad2 and 7056ba5

* Fix notification button spanning full width rather than content width

* Add a way to access a singleton to smart filter and use clearer code

* Update view holders using smart input filters to use more singletons

* Fix code style lacking spaces before boolean checks in ifs and others

* Remove all code related to collapsibility preferences, strings included

* Update style to match content warning toggle button

* Update strings to give cleaner differentiation between CW and collapse

* Update smart filter code to use fully qualified names to avoid confusion
2018-09-19 19:51:20 +02:00
Gian Sass d4547a04dc sort custom emojis alphabetically (#853) 2018-09-18 20:46:50 +02:00
Conny Duck ee8dc7831f remove fake shadow view and replace with elevation in AccountActivity 2018-09-16 19:46:06 +02:00
Konrad Pozniak 3e2dc9f79b update targetSdkVersion to 28 (#842)
* update targetSdkVersion to 28

* update robolectric to support api 28
2018-09-16 19:23:32 +02:00
Konrad Pozniak 6a7ec93b98 update minSdkVersion to 21 (#843)
* set minSdkVersion to 21

* use elevation instead of additional views for shadow

* clean up code occurrences

* remove drawable compat code

* remove no longer needed resources

* remove unneeded android:clipChildren="false"

* Revert "remove no longer needed resources"

This reverts commit 67a4d6f8d87b3f116b95d90dfb48f350d342f503.

* remove no longer needed resources (this time the right ones)
2018-09-16 18:54:12 +02:00
Conny Duck ef9ac3939e fix crash when trying to view account with invalid id
closes #848
2018-09-15 21:51:53 +02:00
Conny Duck 4dd70762c2 dont hold whole file content in memory when uploading media 2018-09-10 10:00:06 +02:00
Conny Duck 14ac883496 update media limits for Mastodon 2.5 2018-09-10 10:00:06 +02:00