Commit Graph

1147 Commits

Author SHA1 Message Date
Konrad Pozniak 1a6f8d5b24
fix CalledFromWrongThreadException in ComposeActivity (#1447) 2019-08-10 21:11:45 +02:00
Ivan Kupalov 0b29b0330b Fix search bugs, fix #1403 (#1440) 2019-08-04 20:32:44 +02:00
Levi Bard ce01e6de22 Add support for instance property `max_bio_chars` (#1414)
* Migrate getInstance from Call to Single

* Add support for instance max_bio_chars.
Addresses #1329
2019-08-04 20:25:07 +02:00
Ivan Kupalov 9805a985b2 Use cached preview as thumbnail in ViewImageFragment, fix #1267 (#1344)
* Use cached preview as thumbnail in ViewImageFragment, fix #1267

* Use cached preview as thumbnail in ViewImageFragment, fix #1267
2019-08-04 20:22:57 +02:00
Konrad Pozniak 70b3ce7487
fix avatar radius and alignment in NotificationsAdapter (#1437) 2019-08-01 20:47:15 +02:00
Konrad Pozniak 507cb81d6a
fix size of visibility icon on detailed toot page (#1428) 2019-07-31 19:07:01 +02:00
Konrad Pozniak 941cdf198a
upgrade dagger (#1424) 2019-07-28 20:00:19 +02:00
Konrad Pozniak 8834c22120
add option to always expand content warnings (#1422) 2019-07-28 19:59:52 +02:00
Konrad Pozniak 588775ff9b
cleanup code in StatusViewHolders (#1418)
* cleanup code in status ViewHolder

* add check for reblogButton back in
2019-07-27 21:53:28 +02:00
Konrad Pozniak 57edf86495
fix timestamp not updating in notifications (#1416) 2019-07-27 21:52:00 +02:00
Konrad Pozniak ce84233c4e
fix crash in FiltersActivity (#1409) 2019-07-25 12:17:52 +02:00
Konrad Pozniak 51da2a15e8
fix notifications opening the wrong account (#1408) 2019-07-25 12:17:30 +02:00
Konrad Pozniak fbd04cbe7b
fix the "always mark media as sensitive" setting not being respected (#1407) 2019-07-25 12:17:07 +02:00
Konrad Pozniak 7ae07111af
show custom emojis in account field names (#1406) 2019-07-25 12:16:42 +02:00
Konrad Pozniak b15b4fcf83
fix mentions outside of content warnings not being clickable (#1405) 2019-07-25 12:16:19 +02:00
Konrad Pozniak f975522e63
fix shouldTrimStatus and add tests (#1404) 2019-07-25 12:15:54 +02:00
Ivan Kupalov a23fdc60a7 Fix crash on empty status messages (#1402) 2019-07-20 11:37:28 +02:00
HellPie 87285ae5bf Transfer SmartLengthInputFilter license to Tusky (#1384)
* Transfer SmartLengthInputFilter in-header license

Transfer license for file "SmartLengthInputFilter.java" from me (Diego Rossi) to Tusky and therefore also change it from the original Apache 2.0 to currently GPLv3. This was a mistake that has been sitting around for way too long.

* Rewrite SmartLengthInputFilter from Java to Kotlin

This has been done by hand, without the custom copy-paste tool.

* Fix bad references in Java files using SmartLengthInputFilter features

* Shorten code in Java classes referencing SmartLengthInputFilter instance

* Refactor SmartLengthInputFilter from class to singleton Kotlin object

* Move hasBadRatio to become a toplevel function

* Patch up all the files affected by SmartLengthInputFilter changes

* Length in SmartLengthInputFilter is const 500, simplify code accordingly

* More meaningful name for toplevel function for checking trimming ability

* Add missing license header
2019-07-19 20:47:30 +02:00
pandasoft0 3b1288e99c Improve search results (#1327)
* Add entities and request for search APIv2

* Implement search adapter and fragment

* Fix issue with snackbar

* Implement search accounts fragment

* Implement generic search fragment

* Remove unneeded import

* Implement "status" actions, fix issues

* Remove SFragment dependency

* Update app/src/main/java/com/keylesspalace/tusky/components/search/fragments/SearchStatusesFragment.kt

Co-Authored-By: Konrad Pozniak <connyduck@users.noreply.github.com>

* Clean-up post review suggestions

* Make TabLayout background colour match search bar

* Corrected method call syntax

* Added SwipeRefreshLayout to SearchFragment

* Fixed refresh to update all three tabs
2019-07-19 20:10:20 +02:00
Konrad Pozniak e8ecdb88cf
fix avatars and display names in AccountsInListFragment (#1392)
* fix avatars and display names in AccountsInListFragment

* correctly emojify display names
2019-07-16 20:19:57 +02:00
Konrad Pozniak b1c2fcc157
update timestamps on pull-to-refresh even when no new statuses are fetched (#1393) 2019-07-16 19:51:44 +02:00
Konrad Pozniak d932912616
upgrade dependencies (#1389) 2019-07-16 19:36:04 +02:00
Konrad Pozniak 16bb011f6a
fix glide crash in MainActivity (again) (#1394) 2019-07-16 19:27:26 +02:00
Konrad Pozniak 83f9638aaf
fix some lint warnings and Kotlin style issues (#1390) 2019-07-16 19:26:55 +02:00
Konrad Pozniak a46922bfde
make avatar images in drawer rounded squares (#1388) 2019-07-16 19:26:41 +02:00
Konrad Pozniak bcd5262314
fix Glide crash in MainActivity (#1379)
* fix Glide crash in MainActivity

* make emojiInitCallback final
2019-07-10 21:10:07 +02:00
Konrad Pozniak 75734d0e91
fix card view outline being off a few pixels (#1375) 2019-07-10 06:53:21 +02:00
Konrad Pozniak 1dda2c55fc
fix mute action not being correctly displayed (#1376) 2019-07-10 06:52:51 +02:00
Konrad Pozniak db369aec75
fix timeline reloading and favs/boosts/polls showing up at wrong pos (#1374) 2019-07-10 06:52:13 +02:00
Levi Bard d4ec0bb101 Apply conversation filters to threads. Addresses #1349 (#1351)
* Apply conversation filters to threads. Addresses #1349

* Cache filters for app lifetime, unless filters are modified locally

* Flush cached filters when changing accounts
2019-07-08 12:57:53 +02:00
Levi Bard c3cae4a603 Fix respecting bot overlay preference in detailed status view. (#1368)
Closes #1364
2019-07-07 14:41:07 +02:00
Konrad Pozniak fdee75c84a
fix crash caused by broken mention (#1360) 2019-07-02 10:55:02 +02:00
Konrad Pozniak 1d2e42b9f5
fix LoginActivity created twice on unauthenticated appstart (#1352)
* fix LoginActivity created twice on unauthenticated appstart

* make SplashActivity not inherit from BaseActivity
2019-06-29 11:39:50 +02:00
Konrad Pozniak 707f3e605c
fix build warnings (#1331) 2019-06-24 22:15:31 +02:00
Konrad Pozniak 56b53c458a
fix vanishing toots bug when refreshing (#1343) 2019-06-24 21:43:14 +02:00
Konrad Pozniak ac2e16e08c
fix image transition from timeline to ViewMediaActivity (#1348) 2019-06-24 20:52:38 +02:00
Levi Bard ffb6c9a7a7 Add @ and # helper buttons to compose activity (#1277)
Addresses #810
2019-06-24 10:33:05 +02:00
Levi Bard 46efdf7830 Add the 'whole word' setting to the filter preferences UI (#1278) 2019-06-24 10:11:25 +02:00
Konrad Pozniak b95ff10a3c
Unlimited number of poll options (#1340)
* implement unlimited number of poll options

* fixes

* extract percent calculation into function so it can be used anywhere

* add license header
2019-06-22 21:55:03 +02:00
Ivan Kupalov d827bd120f Show media descriptions in timeline when previews are disabled. (#1284) 2019-06-22 20:38:53 +02:00
Konrad Pozniak b825f42c7a
Improve link preview cards (#1330)
* improve card frame

* add placeholder for empty image

* improve layout, Pleroma compatibility, show author name as description fallback

* reset okhttp logging level

* remove unneeded statement
2019-06-22 08:05:55 +02:00
Konrad Pozniak e6d91c1cf3
remove boosted status when the original author was blocked or muted (#1335) 2019-06-22 08:05:24 +02:00
Konrad Pozniak 22bd0462b7
update Room to 2.1.0 (#1323) 2019-06-17 13:43:11 +02:00
Konrad Pozniak ab4f981955
fix conversation avatars (#1324) 2019-06-17 13:14:44 +02:00
Marie Axelsson 5d04a7ccda
Merge pull request #1303 from mlc/rick_roll_domains
Rick roll instead of logging in on selected domains. This is not censorship, but rather a choice by this house who will facilitate our services to.
2019-06-17 12:37:15 +02:00
pandasoft0 0ddde62202 Disable sensitive media send if medias list is empty (#1309) 2019-06-11 16:44:02 +02:00
pandasoft0 ce501f24e6 Add setting to show/hide notification filter bar (#1314)
* Add setting to show/hide notification filter bar tuskyapp/Tusky#1306

* Remove not required requestLayout

* Fix notifications reload issue
2019-06-11 16:41:15 +02:00
Levi Bard a6819ce28e Implement instance mutes (#1311)
* Implement instance mutes. #1143

* Move new classes to instancemute component

* Add progress bar while instance list loads

* Add undo snackbar for instance unmuting

* Update display text for instance mutes
2019-06-11 15:56:27 +02:00
kyori19 4d916eb106 Fix onBackPressed never called in ComposeActivity (#1317) 2019-06-10 19:40:07 +02:00
Konrad Pozniak 05d939b68a
Update Dagger & other deps (#1315)
* update dagger

* update remaining deps
2019-06-09 19:48:04 +02:00
pandasoft0 c335651b6b Redesign report activity (#1295)
* Report activity core

* Implement navigation

* Implement navigation

* Update strings

* Revert manifest formatting

* Implement Done page

* Add landscape layout

* Implement Note fragment

* Create component

* Implement simple status adapter

* Format code

* Add date/time to report statuses

* Refactor status view holder

* Refactor code

* Refactor ViewPager

* Replace MaterialButton with Button

* Remove unneeded string

* Update Text and Check views style

* Remove old ReportActivity and rename Report2Activity to ReportActivity

* Hide "report to remote instance" checkbox for local accounts

* Add account, hashtag and links click handler

* Add media preview

* Add sensitive content support

* Add status expand/collapse support

* Update adapter to user adapterPosition instead of stored status

* Updated checked change handling

* Add polls support to report screen

* Add copyright

* Set buttonTint at CheckBox

* Exclude reblogs from statuses for reports

* Change final page check mark size

* Update report note screen

* Fix typos

* Remove unused params from api endpoint

* Replace .visibility with show()/hide()

* Replace Date().time with System.currentTime...

* Add line spacing

* Fix close button tint issue

* Updated status adapter
2019-06-09 16:55:34 +02:00
Constantin A f7581daa75 2019 Emoji Update (#1261)
* Updated EmojiCompat support:
- Fonts are now updatable
  - Old fonts will automatically be deleted
- Noto Emoji is supported
- New library version

* It will now (hopefully) only look through the emoji font directory if it exists...

* Added a noto emoji icon for Android <=6;
Font files and their version relation are only loaded once now.

* Small bugfix for the noto emoji icon

* Changed the initial size of the existingFontFiles list to a constant value

* Bugfixes
Old files are now (really) deleted
The latest version is used as the actuall font
Further optimizations

* Emoji font update triggers restart dialog

* Resized the Noto icon;
(Hopefully) fixed EmojiCompat (again)
2019-06-06 21:51:56 +02:00
Konrad Pozniak 794903f496
correctly emojify account name in AccountActivity (#1297) 2019-06-05 21:35:29 +02:00
Konrad Pozniak a956061cbf
cleanup unused resources (#1300) 2019-06-02 22:02:03 +02:00
Konrad Pozniak 2b2212e951
cleanup entity classes and ViewThreadFragment (#1302)
* cleanup entity classes and ViewThreadFragment

* fix tests
2019-06-02 21:23:18 +02:00
Konrad Pozniak d863bc50e4
apply filters to boosted statuses (#1299) 2019-06-02 21:21:56 +02:00
mike castleman b15a5c7614
enhance bad-domain detection 2019-06-01 15:29:15 -04:00
mike castleman ee35a9768f
rick roll instead of logging in on selected domains 2019-06-01 14:47:14 -04:00
Konrad Pozniak 91d01bce05
Merge pull request #1296 from unstabler/impl-simple-shortcuts
improve usability: add shortcuts for compose/send new toot [#505]
2019-05-31 15:01:12 +02:00
Gyuhwan Park 50b50a182e fix(MainActivity,ComposeActivity): use onKeyDown() instead 2019-05-31 17:35:58 +09:00
Konrad Pozniak 9a90594fae
Merge pull request #1288 from tuskyapp/poll-description
Minimal screen reader support for polls
2019-05-30 21:53:56 +02:00
Gyuhwan Park d31aa7fc43 feature(ComposeActivity): add shortcut for send new toot (CTRL + ENTER) [#505] 2019-05-30 21:22:52 +09:00
Gyuhwan Park 8cbf8b59bd feature(MainActivity): add shortcut for compose new toot (SHIFT + N or CTRL + N) [#505] 2019-05-30 21:20:53 +09:00
lenchan139 6fc62d3c01 make a copy of file before upload (#1294) 2019-05-29 20:26:33 +02:00
charlag 3f613dc56f Minimal screen reader support for polls 2019-05-26 15:56:26 +02:00
Konrad Pozniak 9690cd5730
add avatar placeholders back in (#1285) 2019-05-26 10:06:22 +02:00
Konrad Pozniak 83696b5c7f
Animate gif avatars (#1279)
* animate gif avatars

* add setting to enable avatar animation

* cleanup code
2019-05-26 08:46:08 +02:00
Konrad Pozniak da1089184c
improve performance when clearing notifications (#1283) 2019-05-26 08:45:25 +02:00
Konrad Pozniak 7733e387ee
improve notification fragment layout (#1282)
* improve notification fragment layout

* improve sw640dp notification fragment layout
2019-05-26 08:39:21 +02:00
Konrad Pozniak 959a08437d
remove some unneeded code from BaseActivity (#1281) 2019-05-26 08:12:42 +02:00
Konrad Pozniak c8bf07ea77
fix crash in SearchFragment (#1266) 2019-05-18 16:52:48 +02:00
pandasoft0 ae5d8b8633 Account Activity enhancements (#1196)
* use the "follow" button as an "unblock" button on the profiles of blocked users

* use the "follow" button as an "unblock" button on the profiles of blocked users

* add an icon to the profiles that can be clicked to mute/unmute the user

* add an icon to the profiles that can be clicked to mute/unmute the user

* Fix view issues

* Fix view issues

* Implement swipe to refresh for Account layout

* Implement swipe to refresh handler at the account screen

* Implement swipe to refresh

* Correct account refresh

* Show Progress Bar

* Show Progress Bar

* Move "itSelf" check into the viewModel

* Change methods access level

* Change TimelineFragment newInstance overload

* Change avatarSize type to Float

* Replace ImageButton with MaterialButton

* Update account activity swipe to refresh colors

* Refactor code

* Refactor code

* Fix crash on moved account refresh

* Show moved account stats

* Update mute button behaviour

* Show tabs and content for moved accounts

* Fix crash on tablet
2019-05-15 12:43:16 +02:00
Konrad Pozniak 419ae80c60
fix images with focal point not shown in timeline (#1256) 2019-05-11 17:35:07 +02:00
Konrad Pozniak 561d4cc284
support custom emoji fonts in poll options (#1250) 2019-05-10 20:08:22 +02:00
pandasoft0 5c61786e05 Add correct Content Description for the preview images at the Compose screen (#1188)
* Add correct Content Description for the preview images at the Compose screen. tuskyapp#1155

* Remove "unknown" string from resource. Format code

* Format code

* Update string resource for content description
2019-05-09 20:25:44 +02:00
pandasoft0 c75b046483 Disable click on preference category items (#1239)
* Disable click on preference category item. tuskyapp#1221

Changed compat preferences widget to AndroidX according to (https://developer.android.com/guide/topics/ui/settings.html)

* Update preference categories clickable
2019-05-09 19:21:22 +02:00
Conny Duck 4d58ecb4ea stop buggy gif animation for now 2019-05-08 21:42:22 +02:00
Conny Duck 51cf1a4ec5 fix crash in StatusBaseViewHolder.getVisibilityDescription 2019-05-08 20:19:31 +02:00
Konrad Pozniak 40d3eb8759
Fix bot icon indicator again (#1249)
* fix handling of bot indicator in timeline

* write bot status into db cache

* remove log
2019-05-07 07:37:00 +02:00
Konrad Pozniak d7c32258ae
fix timespan plurals (#1240)
* fix timespan plurals

* rename poll timestamp strings and helper method
2019-05-06 09:59:06 +02:00
Konrad Pozniak b8c32a96de
Poll fixes (#1238)
* update cache when voting on a poll

* fix poll controls color

* don't allow voting on old poll from cache

* check for RecyclerView.NO_POSITION in click listener

* fix crash when voting in a boosted poll
2019-05-05 08:26:17 +02:00
Konrad Pozniak 8f57dddd61
fix poll voting in NotificationFragment (#1234) 2019-05-03 20:42:13 +02:00
Konrad Pozniak 28a76c1a5f
Notification filtering fixes (#1232)
* fix popup menu not shown on Android 5

* use correct no button for notification clearing confirmation dialog
2019-05-03 20:41:55 +02:00
Konrad Pozniak e735e4843e
Poll notifications (#1229)
* show poll notifications in the app

* show poll notifications in the app

* allow filtering poll notifications in the poll fragment

* show poll notifications in system notifications
2019-05-02 19:44:35 +02:00
Konrad Pozniak cb82202d4d
fix deleted status reappearing in the timeline (#1225)
* fix deleted status reappearing in the timeline

* fix crash

* fix tests

* fix instrumented tests

* add test for deleted status in timeline
2019-05-01 22:10:00 +02:00
Konrad Pozniak c739a147cf
fix timeline query not returning poll (#1226) 2019-04-28 10:11:36 +02:00
Konrad Pozniak 8d01e54caf
add support for multiple choice polls (#1212) 2019-04-28 09:58:17 +02:00
Konrad Pozniak c410600fe4
fix Glide crash in MainActivity (#1224) 2019-04-27 18:20:42 +02:00
Konrad Pozniak f235a38cca
fix StatusDetailedVieHolder ignoring useAbsoluteTime setting (#1215) 2019-04-25 19:29:15 +02:00
Konrad Pozniak fd7471f2ab
Polls part 1 - displaying in timelines and voting (#1200)
* add entity classes

* change data models and add database migration

* add polls to StatusViewData

* show poll results

* add methods for vote handling

* add voting interface

* enable voting in TimelineFragment

* update polls immediately

* enable custom emojis for poll options

* enable voting from search fragment

* add voting layout to detailed statuses

* fix tests

* enable voting in ViewThreadFragment

* enable voting in ConversationsFragment

* small refactor for StatusBaseViewHolder
2019-04-22 10:11:00 +02:00
Konrad Pozniak 82d547caf8
fix issue with avatar background recycling (#1209) 2019-04-21 22:59:58 +02:00
Konrad Pozniak 5aa3f958a8
fix downloading media on Android 5 (#1206) 2019-04-21 22:59:49 +02:00
Konrad Pozniak e7afa0362b
add icon for bot indicator preference (#1208) 2019-04-21 22:59:33 +02:00
kyori19 60d6927af6 Implement redraft feature. (#1190)
* Implement "Delete and Edit" feature

* Some changes to ComposeActivity

Support for uploaded medias, sensitive option.

Fix typo.

Change names of some extra keys.

* Use Glide instead of Picasso

* Pass ArrayList instead of json

* Change wording for re-draft

* Fix test
2019-04-21 15:16:39 +02:00
Konrad Pozniak ea048c9f0c
fix crash when status has more than 4 images and accessibility service is active (#1204) 2019-04-21 14:29:47 +02:00
Konrad Pozniak 1b9e279064
fix issue with foreground service on Oreo+ (#1203) 2019-04-21 14:28:51 +02:00
Konrad Pozniak ef66deeae7 fix some lint warnings 2019-04-21 08:24:29 +02:00
Konrad Pozniak 1ae3e86378
remove unneeded CollectionUtil and Either.java (#1201) 2019-04-21 08:24:06 +02:00
Evgeny Petrov 8a6b439408 Added check if text in compose toot field has only whitespaces (#1193) 2019-04-20 12:17:54 +02:00
Konrad Pozniak fb2d3024ab
fix bug where avatars where shown too small (#1199) 2019-04-19 15:23:30 +02:00
pandasoft0 76ce28980c Migrate to Glide (#1175)
* Replace Picasso library with Glide library tuskyapp#1082

* Replace Picasso library with Glide library tuskyapp#1082

* Update load emoji with glide

* Update context used for Glide

* Removed unused import

* Replace deprecated SimpleTarget with CustomTarget

* Fix crash at the view image fragment, remove override image size

* Replace Single.create with Single.fromCallable

* View image fragment refactor

* Fix after merge

* Try to load cached image first and show progress view on failure

* Try to load cached image first and show progress view on failure
2019-04-16 21:39:12 +02:00
pandasoft0 bc3ea2357b Cancel media uploads when closing ComposeActivity #838 (#1189)
* Cancel media uploads on remove the draft message

* Fix formatting
2019-04-12 22:10:52 +02:00
Bernd 84f561af17 confirm delete notifications (#1186)
* confirm delete notificaitons

* Use same strings as website

* Cleanup
2019-04-12 00:13:06 +02:00
Levi Bard 391cd12974 Add bot indicator overlay to avatars (#1173)
* Add bot indicator overlay to avatars

* Add bot overlay to account list in search view

* Add preference for bot avatar overlay
2019-04-09 20:13:25 +02:00
pandasoft0 63e4c1d4e0 Add CLEAR and FILTER buttons to notifications (#1168)
* Issue tuskyapp#762 add clear notifications button to the top of the Notifications adapter

* Issue tuskyapp#764 add the notifications filter

* Update notifications top bar buttons

* Replace PopupMenu with PopupWindow. Save notifications filter to the account table

* Disable hide top bar on empty content at the notification screen

* Add app bar behavior to the sw640 notification layout

* Fix issue with click on top notification tab
2019-04-09 19:13:54 +02:00
pandasoft0 01234bb94b Add ability to scroll to top by tab click at the Account activity (#1146)
* Issue: tuskyapp#1078
Add ability to scroll to top by tab click at the Account activity

* Fix issue with scroll tabs other than current

* Update scroll on click behavior

* Update code formatting

* Remove unused code

* Move tab click listener from Fragments to Activities
2019-04-08 15:40:16 +02:00
Levi Bard a2fa49aafb Fix issue #1174 with span parsing (#1183) 2019-04-08 15:27:41 +02:00
Konrad Pozniak 21a817a8d4
change cw icon color on on/off (#1181) 2019-04-08 13:04:54 +02:00
Konrad Pozniak 4facdc9b68
error handling in FiltersActivity (#1180) 2019-04-07 16:33:08 +02:00
Konrad Pozniak dd02af9911
fix IndexOutOfBoundException caused by ListStatusAccessibilityDelegate (#1178) 2019-04-07 16:32:58 +02:00
Evgeny Petrov 5163927e43 Added "Warning" icon instead of "CW" text. (#1138)
* Added «Warning» icon instead of «CW» text.
Icon source: https://ionicons.com/

* Updated icon to "sms_failed"
2019-04-01 19:19:37 +02:00
Konrad Pozniak 475bff00dc
remove CustomTabsHelper & ResourcesUtils (#1157) 2019-03-30 15:18:40 +01:00
Bernd 0db1a23c4f Update Deps + Cleanup (#1158)
* Fix Typo

* Update build.gradle

* Update Deps

* Update Tests

* Fixes Tests

Without this some tests fail on my PC...

+ also:
"Put this in your gradle.properties:

android.enableUnitTestBinaryResources=true"
from http://robolectric.org/migrating/#project-configuration

* Make everything private

* Fix Warning

* Update TimelineFragment.java

* Update build.gradle

* Update gradle-wrapper.properties

* Update gradle-wrapper.properties

* Update gradle-wrapper.properties

* Fix Compile Errors

e.g.

Type inference failed. Expected type mismatch: inferred type is Preference? but Preference was expected

Type inference failed. Please try to specify type arguments explicitly.

* fix crash

* Grandle Wrapper 5.3

* Revert "Fix Compile Errors"

This reverts commit 4a774a4fe3ce82c84bd7b4d78e1a1c64af97cd0d.

* requirePreference

* oops

* Cleanup

* Update gradle-wrapper.properties
2019-03-30 15:18:16 +01:00
Ivan Kupalov b66582654d Fix issue with content warnings not being expanded from a11y delegate (#1167) 2019-03-30 09:10:34 +01:00
Konrad Pozniak 9b59a57356
Fix wrong notification avatar being displayed sometimes (#1166) 2019-03-30 09:10:01 +01:00
Konrad Pozniak 29455d5ccd
prevent empty hashtag in TabPreferenceActivity (#1160) 2019-03-28 21:10:53 +01:00
Konrad Pozniak 51a3e0ea5e
fix crash in TimelineFragment (#1159) 2019-03-28 21:10:38 +01:00
Levi Bard 5694a75a4c Fix word boundary detection in filters (#1152) 2019-03-25 21:26:57 +01:00
Konrad Pozniak 291a923d51
fix crash when filter request returns an error (#1150) 2019-03-25 20:35:36 +01:00
Konrad Pozniak 2e52457b32
Hide unknown notifications (#1151)
* hide unknown notifications

* hide unknown notifications
2019-03-25 20:35:21 +01:00
pandasoft0 c3df44eaef Update Notification Adapter to support status created timestamp refresh (#1130)
* Update Notification Adapter to support status created timestamp refresh

* Format the code
2019-03-25 13:44:31 +01:00
Konrad Pozniak 0c48dcf06c
add hashtag tabs (#1145)
* add hashtag tabs

* address review feedback
2019-03-24 08:59:55 +01:00
Bernd e839a2c9fe fix sharing to Tusky (#1140)
fixes duplicate title when sharing from Feedly or Google News
2019-03-23 12:50:24 +01:00
Levi Bard 205f3771d4 Add option to download all media for a toot with one tap. (#1121)
Addresses #966
2019-03-23 12:49:36 +01:00
pandasoft0 f1b9f7e9fe Fix issue with floating media bar after permissions request (#1134) 2019-03-20 19:26:39 +01:00
Levi Bard 5135daad2c Share filters with web client (#956)
* First step toward synchronized content filters

* Add simple filter management UI

* Remove old regex filter UI

* More cleanup

* Escape filter phrases when applying them via regex

* Apply code review feedback

* Fix live timeline update when filters change
2019-03-20 19:25:26 +01:00
Konrad Pozniak 463b008090
change project website url (#1128) 2019-03-18 15:47:02 +01:00
Konrad Pozniak cffb33d705
fix proguard issue with NotificationTypeAdapter (#1129) 2019-03-17 07:57:10 +01:00
Konrad Pozniak ff58960801
create IconicsDrawable with right color instead of tinting it later (#1127) 2019-03-16 15:41:41 +01:00
pandasoft0 7680b1b529 Refresh message timestamp every minute (#1113)
* Refresh message timestamp every minute

* Refresh timeline adapter every minute via differ
2019-03-16 14:38:29 +01:00
kyori19 d0f7f6f83c Fix crash with unknown notification type (#1123)
* Fix crash with unknown notification type

* Add NotificationTypeAdapter to handle unknown type

* Remove unneeded SerializedName
2019-03-16 14:33:16 +01:00
Ivan Kupalov 520e0d6e7a List editing (#1104)
* List editing groundwork

* Add ability to add/remove accounts from list, delete lists

* Rename list, improve lists UI

* Add error handling, extract strings

* Revert gradle.properties

* Apply feedback suggestions

* Apply feedback

* Update license header
2019-03-16 13:36:16 +01:00
Konrad Pozniak 08c1bbd253
fix crash in NotificationsFragment (#1119)
* fix crash in NotificationsFragment

* don't reload notifications

* add updateAdapter()
2019-03-13 09:32:59 +01:00
Konrad Pozniak 5f390b378b
Improve Dependency Injection (#1120)
* inject TimelineCases directly into SFragment

* inject ThemeUtils
2019-03-11 17:25:11 +01:00
Conny Duck 028db440ee cleanup code 2019-03-08 21:10:48 +01:00
Mélanie Chauvel (ariasuni) bac131c6d5 Add support for language switching (#1108)
* Add support for language switching

* Clean and improve code based on feedback

* Remove useless logging
2019-03-08 20:33:42 +01:00
Bernd 507ffb1b41 Add new Theme "Use System Design" + fixes to night mode (#1069)
* Add theme system

A theme which follows system design.
See: https://www.xda-developers.com/samsung-galaxy-s9-update-night-mode-schedule/

* update

to be in line with https://github.com/tuskyapp/Tusky/pull/1060/files

* Update ThemeUtils.java

* update

* Cleanup

* Update Deps

* Cleanup

* Update PreferencesActivity.kt

* Workaround to make MODE_NIGHT_FOLLOW_SYSTEM work

* Update ThemeUtils.java

* Use ThemeUtils.THEME_SYSTEM

* Update SplashActivity.kt

* Update strings.xml

* Update Deps

* Update build.gradle

* Update build.gradle

* fix tests
2019-03-07 21:33:29 +01:00
Levi Bard 006300ede6 Fix unhandled NPE when sharing an image from ViewMediaActivity (#1111) 2019-03-07 21:21:21 +01:00
Ivan Kupalov 47fa775f21 Refactor notifications adapter (#985)
* Fix unnecessary reloading of notifications

This removes topId as it is not needed and just plainly uses status id
if needed. During initial loading of notifications topId/bottomId are
not set so we ended up reloading everything.

* Refactor notifications adapter

Use AsyncListDiffer for updating notifications just like in timelines.

* Cleanup in NotificationsFragment
2019-03-07 19:31:18 +01:00
autumnontape 10fcee4798 Add autocompletion for custom emoji (#1089)
* Remove unnecessary //noinspection ConstantConditions

* Add autocompletion for custom emoji

* Update MentionTagTokenizer tests for emoji autocomplete support

* Move 1) emoji list retrieval notifying and 2) setting of emojiList field into setEmojiList() method of ComposeActivity

* Convert RelativeLayout in item_autocomplete_emoji.xml to LinearLayout

* Rename MentionTag* to Compose*

* Improve emoji autocomplete matching

* Make hashtag autocomplete results bold

* Use Context.getString()'s built-in formatting

* Add a divider between emoji autocomplete results that *start with* the token and those that *contain* it
2019-03-04 19:28:08 +01:00
Konrad Pozniak d43b4fef4b
upgrade OkHttp, add Conscrypt (#1083)
* upgrade OkHttp, add Conscrypt

* fix tests
2019-03-04 19:25:51 +01:00
Ivan Kupalov 479d210e64 Timeline a11y (#1059)
* Improve timeline accessibility

* Improve a11y description and actions in timeline

* Refactor timeline accessibility handling, add more actions

* Update app/src/main/java/com/keylesspalace/tusky/adapter/StatusViewHolder.java

Co-Authored-By: charlag <charlag@tutanota.com>

* Add a11y actions for links, hashtags and mentions, enable for detailed.

* A11y delegate: Add open reblogger action, cleanup

* a11y delegate: add reblogs/boosts, improve interrupts

* a11y delegate: add reblogs/boosts, improve interrupts

* a11y delegate: add to notifications fragment
2019-03-04 19:24:27 +01:00
Konrad Pozniak a0b3494c42
Fix crash when sharing to Tusky while not logged in (#1096) 2019-03-03 21:27:34 +01:00
Mélanie Chauvel (ariasuni) b714f47a5f Fix visibility of answer from DM column, from private to direct (#1094) 2019-03-03 17:44:29 +01:00
Konrad Pozniak 754897ea9b
Fix crash on Android 9 when replying from notification (#1091) 2019-03-01 21:06:48 +01:00
Konrad Pozniak d5fcbea5ac
fix crash in account activity (#1085) 2019-02-27 20:03:38 +01:00
Konrad Pozniak ffcc294107
fix crash in TimelineFragment (#1086) 2019-02-27 20:03:28 +01:00
Ivan Kupalov 15b441b180 Fix resizing image uniformly when opening an image (#1076) 2019-02-26 18:32:15 +01:00
Konrad Pozniak 5ee78e68ba
remove unnecessary divider styling (#1057) 2019-02-26 18:28:20 +01:00
Conny Duck 72d15f341d fix crash on Android 5 2019-02-22 16:58:13 +01:00
Bernd bbd37c6cd4 Fix Crash (#1066)
* fix possible npe

* Update ConversationViewHolder.java

* revert unneded changes
2019-02-20 18:49:03 +01:00
Konrad Pozniak 1621c1e689
fix crash in AccountListFragment (#1065)
* fix crash in AccountListFragment

* remove unnecessary subscribeOn
2019-02-20 18:42:18 +01:00
Mihai Boisteanu d150cebcd0 Fixed sharing files doesn't return control after posting (#1062) 2019-02-19 20:56:13 +01:00
Konrad Pozniak 8201f2539d
fix close button behavior in ComposeActivity (#1056) 2019-02-17 20:50:06 +01:00
Konrad Pozniak fd3226d244
fix crash when opening a thread in the browser (#1053)
* fix crash when opening a Thread in the browser

* avoid redundant actionableStatus.getActionableId()
2019-02-17 19:09:30 +01:00
Conny Duck 88ce1a1d79 fix boost/fav count resetting after boosting a detailed status 2019-02-16 15:53:56 +01:00
Conny Duck 83dc45be35 fix ConcurrentModificationException when sorting accounts 2019-02-16 14:49:17 +01:00
Konrad Pozniak d371074d2a
fix statuses collapsing when faving/boosting in ViewThreadFragment (#1047) 2019-02-16 14:35:06 +01:00
Ondřej Hruška fcc67c6918 Fix large image attachments not showing (#1043)
* fix for too large image attachments not fitting into GL texture

* Don't use context!!
2019-02-16 14:31:41 +01:00
Conny Duck f4ac9b3da6 make max tabs reached message translateable 2019-02-15 21:35:14 +01:00
Konrad Pozniak 27cf5f5380
call db functions on background thread in ConversationsViewModel (#1040)
* call db functions on background thread in ConversationsViewModel

* use stable library versions
2019-02-15 20:41:10 +01:00
Konrad Pozniak fdc66288b1
Fix crash with null lastStatus in Conversations (#1042) 2019-02-13 21:14:12 +01:00
Konrad Pozniak fe1e9f4100
delete conversation cache on logout (#1037)
* delete conversation cache on logout

* use correct threading method
2019-02-13 19:21:04 +01:00
Konrad Pozniak fc95903866
call db operation on background thread in TabPreferenceActivity (#1036) 2019-02-13 19:20:43 +01:00
Konrad Pozniak 6c93555ad0
remove unneeded instance id from db cache (#1035)
* remove unneeded instance id from db cache

* fix TimelineDAOTest

* fix TimelineRepositoryTest
2019-02-13 19:20:31 +01:00
Konrad Pozniak e371fa0e24
Tab customization & direct messages tab (#1012)
* custom tabs

* custom tabs interface

* implement custom tab functionality

* add database migration

* fix bugs, improve ThemeUtils nullability handling

* implement conversationsfragment

* setup ConversationViewHolder

* implement favs

* add button functionality

* revert 10.json

* revert item_status_notification.xml

* implement more menu, replying, fix stuff, clean up

* fix tests

* fix bug with expanding statuses

* min and max number of tabs

* settings support, fix bugs

* database migration

* fix scrolling to top after refresh

* fix                                 bugs

* fix warning in item_conversation
2019-02-12 19:22:37 +01:00
Konrad Pozniak adf573646e
use the correct settings in SearchFragment (#1034) 2019-02-11 21:24:43 +01:00
Conny Duck 683b06a35d upgrade deps, fix some lint warnings 2019-02-11 16:59:01 +01:00
Conny Duck eeaadea905 Revert "Generalize url scheme parsing/highlighting (#1008)"
This reverts commit 85610a8311.
2019-02-11 14:43:57 +01:00
Conny Duck 85593b519b fix share chooser dialog design 2019-02-08 17:42:55 +01:00
Levi Bard d5173c2268 Add support for selecting account when sharing from outside apps (#1011)
* Add direct-share support (API 23+)

* Add account selection dialog for non-direct sharing
2019-02-06 10:23:02 +01:00
lenchan139 5876fbeb29 Attach subject when composing with shared content from other apps (#1020)
* +attach subject when composing with shared content from other apps

* Update strings.xml

* Update preferences.xml

* Update strings.xml

* remove option for add subject of shared to composeActivity

* Update preferences.xml
2019-02-05 20:12:37 +01:00
Ivan Kupalov 63952813c8 Fix incorrectly incrementing IDs before sending to server. (#1026)
* Fix incorrectly incrementing IDs before sending to server.

* Add TimelineRepositoryTest, fix adding placeholder, fix String#dec()

* Add more TimelineRepository tests, fix bugs

* Add tests for adding statuses from DB.
2019-02-05 20:06:00 +01:00
Levi Bard 85610a8311 Generalize url scheme parsing/highlighting (#1008)
* Add support for highlighting dat, ssb, ipfs url schemes. #847

* Generalize scheme parsing for url highlighting. #847

* Migrate LinkHelper to kotlin
2019-02-05 19:55:28 +01:00
Ivan Kupalov 22ee1dc5df Fix IDs (#1016)
* Allow any String IDs as long as they're sortable

* Allow any String IDs as long as they're sortable
2019-01-31 19:03:34 +01:00
Ivan Kupalov 87364edd98 Fix empty state for account media, fix tablets (#1018) 2019-01-31 18:31:15 +01:00
Konrad Pozniak 6b7ca5d184
fix autocomplete of usernames (#1019) 2019-01-30 22:10:05 +01:00
Ivan Kupalov c0c73f5c06 Error artwork (#1000)
* Add new Elephant Friend images. Use them in ListsActivity.

* Add error images to AccountListFragment

* Add error images to Timeline & Notifications fragment. Needs rework.

* Introduce BackgroundMessageView. Use it in AccountList.

* Use correct button style for BackgroundMessageView

Co-Authored-By: charlag <charlag@tutanota.com>

* Use BackgroundMessageView

* Add BackgroundMessageView docs

* Re-color and document elephants

* Apply feedback, disable refresh when error is shown

* Fix string typo
2019-01-28 19:02:31 +01:00
Ivan Kupalov ce80b0c663 Fix crash in media tab, fix #1005 (#1007) 2019-01-28 11:05:13 +01:00
Ivan Kupalov a3ee13d767 Add hashtag autocompletion, closes #769 (#1001)
* Add hashtag autocompletion, closes #769

* Apply review feedback
2019-01-28 11:04:05 +01:00
kyori19 96162ab544 Add pinned status tab (#994)
* Add pinned status tab

* Make TabLayout scrollable.
2019-01-21 08:37:25 +01:00
Konrad Pozniak fe535c2e0c
never use 0 account ids to prevent caching problems (#999) 2019-01-19 21:14:23 +01:00
Levi Bard 8014b1296d Ensure that the right account is shown as selected after performing "Open as". #992 (#996) 2019-01-18 18:08:11 +01:00
Levi Bard 91fba293f2 Implement "Open status as (another account)" #958 (#988) 2019-01-16 20:50:09 +01:00
Levi Bard 922f165f95 Ensure that query/fragment/etc. don't get embedded into local filenames (#989)
when downloading #886
2019-01-15 20:57:13 +01:00
Conny Duck fa0ee82fe4 fix build 2019-01-14 22:29:12 +01:00
Ivan Kupalov 3ab78a19bc Caching toots (#809)
* Initial timeline cache implementation

* Fix build/DI errors for caching

* Rename timeline entities tables. Add migration. Add DB scheme file.

* Fix uniqueness problem, change offline strategy, improve mapping

* Try to merge in new statuses, fix bottom loading, fix saving spans.

* Fix reblogs IDs, fix inserting elements from top

* Send one more request to get latest timeline statuses

* Give Timeline placeholders string id. Rewrite Either in Kotlin

* Initial placeholder implementation for caching

* Fix crash on removing overlap statuses

* Migrate counters to long

* Remove unused counters. Add minimal TimelineDAOTest

* Fix bug with placeholder ID

* Update cache in response to events. Refactor TimelineCases

* Fix crash, reduce number of placeholders

* Fix crash, fix filtering, improve placeholder handling

* Fix migration, add 8-9 migration test

* Fix initial timeline update, remove more placeholders

* Add cleanup for old statuses

* Fix cleanup

* Delete ExampleInstrumentedTest

* Improve timeline UX regarding caching

* Fix typos

* Fix initial timeline update

* Cleanup/fix initial timeline update

* Workaround for weird behavior of first post on initial tl update.

* Change counter types back to int

* Clear timeline cache on logout

* Fix loading when timeline is completely empty

* Fix androidx migration issues

* Fix tests

* Apply caching feedback

* Save account emojis to cache

* Fix warnings and bugs
2019-01-14 22:05:08 +01:00
kyori19 75158a3aa0 Fix typo (#987)
* Optimize imports

* Fix typo in 'replyingStatusAuthor'
2019-01-14 21:57:22 +01:00
Ivan Kupalov fb83d086d1 Fix unnecessary reloading of notifications (#984)
This removes topId as it is not needed and just plainly uses status id
if needed. During initial loading of notifications topId/bottomId are
not set so we ended up reloading everything.
2019-01-11 22:07:40 +01:00
Konrad Pozniak 15af80c5a0
fix mentions and more menu after a fresh login (#986) 2019-01-11 22:07:25 +01:00
Konrad Pozniak 15ca16e06f
fix long toots not collapsing correctly in timelines (#976) 2019-01-11 20:05:15 +01:00
Ivan Kupalov 38c7c8c71a Rework status layouts with ConstraintLayout (#967)
* Migrate item_status_detailed layout, minimum

* Migrate item_status_detailed layout, buttons

* Migrate item_status layout, minimum + buttons

* Migrate status layouts, fix RTL, cleanup

* Fix item_status layout

* Fix item_status name layout, fix CW button

* Simplify item_status, item_status_detailed layouts with chains

* Apply statuses layout feedback
2019-01-06 10:39:42 +01:00
jchmrt 30df1cf403 Set image previews correctly according to their focal points (#899)
* Add serialization of the meta-data and focus objects

These objects are added in some attachments. This commit adds data
classes which are able to serialize these (partially) in preparation
for the ability to honour the focal point information in image
previews.

* Implement correctly honouring the focal point meta-data in previews

This commit adds code which ensures that the image previews of media
attachments to toots are correctly cropped to always show the focal
point of the image (if it is specified). It should not in any way
influence how previews of media without a focal point are shown.

To achieve the correct crop on the image a few components were
needed:

First of all we needed a way to influence how the image is cropped
into the ImageView. It turns out that the preferred way to do this is
by setting the ScaleType to MATRIX and adjusting the matrix of the
image as needed. This matrix allows us to scale and transform the
image in the way we need to make sure that the focal point is visible
within the view. For this purpose we have the FocalPointEnforcer which
can calculate and set the appropriate matrix on an ImageView as soon
as the image is loaded.

However a second problem is that we need to make sure that this matrix
is updated whenever the size of the ImageView changes. The size might
change for example because the orientation of the device changed from
portrait to landscape or vice versas, or for a number of other reasons
such as the screen being split vertically or something like that.

To be able to hook onto this event we need to create a new extended
version of the ImageView class, which we call
MediaPreviewImageView. This class behaves exactly the same as a normal
ImageView, however if the focalPointEnforcer of this view is set, then
it will call this enforcer to update the image matrix any time the
size is changed.

So this commit changes all media previews in the item_status.xml and
item_status_detailled.xml layout files to the new
MediaPreviewImageView class. Additionally in the code for loading the
images into the previews a new case is added which tests if there is a
focus attribute in the meta-data. If so it makes sure to create and
set the FocalPointEnforcer.

* Fix typos in documentation comment

"to" -> "too"

* Use static imports to remove clutter in FocalPointEnforcerTest

Instead of duplication Assert. in front of every assertEquals, simply
statically import it.

* Move the MetaData and Focus classes into the Attachment class

Since they are very strongly linked to the attachment class and are
themselves very small.

* Refactor the focal point handling code

- All the code modifying the actual members of the
  MediaPreviewImageView is now in this class itself. This class still
  uses the FocalPointUtil to calculate the new Matrix, but it now
  handles setting this new Matrix itself.

- The FocalPointEnforcer has been renamed to the FocalPointUtil to
  reflect that it only calculates the correct matrix, but doesn't set
  anything on the MediaPreviewImageView.

- The Matrix used to control the cropping of the
  MediaPreviewImageViews is now only allocated a single time per view
  instead of each time the view is resized. This is done by caching
  the Matrix and passing it to the FocalPointUtil to update on each
  resize.

* Only reallocate focalMatrix if it is not yet initialized

This helps prevent unnecessary allocations in the case where
setFocalPoint is called multiple times.

* Change checking of availability of objects to use != null

As pointed out, the 'is' keyword is meant for checking types, not for
checking non-nullness.

* Make updateFocalPointMatrix() return nothing

This makes it clearer that it actually mutates the matrix it is
given.

* Fix bug with transitions crashing the PhotoView

Due to the android transitions for some reason copying the scaletype
from the MediaPreviewImageView to the PhotoView during the transition,
the PhotoView would crash on pictures with a focal point, since
PhotoView doesn't support ScaleType.MATRIX.

This is solved by the workaround of overriding both the getScaleType
and setScaleType methods to ensure that we use the MATRIX type in the
preview and the center_crop type in the PhotoView.

Additionally this commit also makes sure to remove the focal point
when the MediaPreviewImageView is recycled.

* Fix bug in overriden getScaleType

Instead of simply returning the scaleType we need to return the
super.getScaleType() method, to avoid crashing.

* Merge changes from master

Mainly the migration to androidx.
2018-12-28 16:32:07 +01:00
Konrad Pozniak cd6766c261
hide toot content TextView when its empty (#969) 2018-12-27 22:32:14 +01:00
Konrad Pozniak c869886c19
add the ability to see who faved or boosted a toot (#962)
* move reblog/fav count up in detailed status view and make them clickable

* use status object returned by api when reblogging/faving

* Reblogs -> Boosts

* add support for viewing who faved/reblogged a status

* add onShowReblogs/onShowFavs to listener, fix display bug

* remove unneeded icon from previous revision

* small code improvements

* fix liking/boosting toot with card
2018-12-27 09:48:24 +01:00
Ivan Kupalov bac15c42bd Export Room schemes (#963) 2018-12-25 20:06:28 +01:00
kyori19 c9ce380d7a Fix wrong visibility icon(tuskyapp#901) (#960) 2018-12-20 18:25:36 +01:00
Conny Duck f26c1718c9 update deps 2018-12-18 22:05:33 +01:00
Conny Duck 554099f79d improve dialog styling 2018-12-17 20:47:42 +01:00
Konrad Pozniak a445c12094
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) 1c34d21a23 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 eb7b000cc1 fix crash when using quick compose tile 2018-12-13 22:29:12 +01:00
Mélanie Chauvel (ariasuni) 5230bd29a6 Fix a lot of easy-to-fix warnings (#957) 2018-12-12 20:28:05 +01:00
Conny Duck c3e5305fa2 fix another crash in ViewImageFragment 2018-12-12 19:37:18 +01:00
Conny Duck a0c399e2cf fix crash in MediaUtils.getVideoThumbnail 2018-12-12 18:56:42 +01:00
Konrad Pozniak 73670b8576
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 073c673e6d fix crash in EditProfileActivity 2018-12-06 22:34:36 +01:00
Conny Duck f87b87bea3 close drawer when clicking on own profile and adding account
closes #948
2018-12-05 22:37:04 +01:00
Conny Duck aae72205c3 show correct username of author when sharing toot content
closes #918
2018-12-03 15:22:51 +01:00
Konrad Pozniak 1413a1155b
remove unnecessary compat code (#932) 2018-12-03 11:22:57 +01:00
Konrad Pozniak 8d7f879a8f
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 19783c5aed Apply suggestions for ProgressImageView (#942) 2018-12-03 11:02:07 +01:00
Billy Brawner 95a656dc0a 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 9627d73f68 fix NullPointerException in ViewImageFragment 2018-11-27 21:18:21 +01:00
Conny Duck f185c9d379 fix crash in ComposeActivity when loading no Emojis 2018-11-27 21:07:15 +01:00
Conny Duck f5ec6b1ef7 fix NullPointerException in ViewImageFragment 2018-11-25 20:16:38 +01:00
Conny Duck 3b475e8461 fix activity restart after theme switch 2018-11-18 12:29:11 +01:00
Conny Duck f880a2eef5 fix crash on unknown media type 2018-11-17 16:17:47 +01:00
Conny Duck 15d607b799 update deps, fix some lint warnings 2018-11-16 13:31:03 +01:00
kyori19 ecd4680696 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 348c20c792
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 690e612f8b 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 026292122d Do not show "Pin" in "more" menu of direct status. (#909) 2018-11-06 18:10:07 +01:00
kyori19 d8d37bacd9 Fix typo "accountUsename" to "accountUsername" (#908) 2018-11-06 18:03:10 +01:00
Levi Bard b483a0bf25 Filter emoji where "visible_in_picker" is set to false. (#907)
Addresses #770
2018-11-04 10:51:31 +01:00
Levi Bard 6960d725a3 Add menu item to copy media link (#895) 2018-11-01 15:13:37 +01:00
Levi Bard 4ba6b4adfe 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 af298e5281 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 952d2a6512 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 1556a88d05 Prevent multiple registrations to eventHub on same TimelineFragment (#879) 2018-10-15 19:47:50 +02:00
Levi Bard 25c3defd33 On android 6.0, filter 0x00ad (unicode soft hyphen) from statuses (#884)
Fixes #563
2018-10-15 19:47:10 +02:00
Levi Bard bc4b77512f Focus content warning field on activation (#883)
Fixes #773
2018-10-12 21:53:04 +02:00
Ivan Kupalov 6051ffe0b3 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 a0988dc6c6 Add ability to pin/unpin statuses (#872) 2018-10-03 21:27:52 +02:00
Levi Bard 0bca94b94e 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 ab601c4566 Add deletion confirmation (#865) 2018-10-01 08:50:48 +02:00
Konrad Pozniak bf00cfcc4d
style dark dialogs (#864) 2018-09-29 19:44:50 +02:00
Konrad Pozniak 7bdc22aa28
small improvements for viewholders (#860) 2018-09-28 17:15:01 +02:00
Konrad Pozniak c37dbd15af
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 4ded425466 Make Tusky a share target for video (#857) 2018-09-28 17:11:32 +02:00
Conny Duck a2eb41900f fix RecentlyNonNull/Nullable warnings 2018-09-22 21:11:18 +02:00
HellPie 4759783d10 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 bfea5119d5 sort custom emojis alphabetically (#853) 2018-09-18 20:46:50 +02:00
Conny Duck 17189216e3 remove fake shadow view and replace with elevation in AccountActivity 2018-09-16 19:46:06 +02:00
Konrad Pozniak dbb3f4e826
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 4402f3d337
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 5621e5d2d4 fix crash when trying to view account with invalid id
closes #848
2018-09-15 21:51:53 +02:00
Conny Duck 669153089a dont hold whole file content in memory when uploading media 2018-09-10 10:00:06 +02:00
Conny Duck 90ef078dd0 update media limits for Mastodon 2.5 2018-09-10 10:00:06 +02:00
Conny Duck 51d231834c Merge branch 'AbsoluteTime' of https://github.com/kyori19/Tusky into kyori19-AbsoluteTime
# Conflicts:
#	app/src/main/java/com/keylesspalace/tusky/adapter/NotificationsAdapter.java
2018-09-09 21:48:01 +02:00