Commit Graph

95 Commits

Author SHA1 Message Date
kyori19 762b2225ca Merge remote-tracking branch 'tuskyapp/develop' 2019-11-19 21:52:13 +09:00
Levi Bard a308b4c139 Don't interpret html inside poll options. (#1527)
* Don't interpret html inside poll options.
Closes #1362

* Update translations

* Mark poll_percent_format as untranslatable
2019-10-11 17:35:22 +02:00
Konrad Pozniak 9a3b92ecbc
change active boost icon (#1513) 2019-10-03 18:55:32 +02:00
kyori19 aa48555902 Merge remote-tracking branch 'tuskyapp/master' 2019-10-03 21:09:01 +09:00
Ivan Kupalov 33a78a59a0 Fix screen reader not announcing post content in some cases (#1495) 2019-09-24 20:33:41 +02:00
kyori19 964c14af3f Merge remote-tracking branch 'tuskyapp/master' 2019-09-16 14:16:00 +09:00
Konrad Pozniak 29ea05a0e5
Fix crash when status date is null (#1480)
* Fix crash when status date is null

* Fix crash when status date is null
2019-09-15 09:10:07 +02:00
Konrad Pozniak c04c51ce41
fix crash because of null visibility (#1478)
* fix crash because of null visibility

* fix crash because of null visibility
2019-09-12 20:03:07 +02:00
kyori19 8c2437c6bf Merge remote-tracking branch 'tuskyapp/master' 2019-09-08 00:11:45 +09:00
Conny Duck 0e2a786b61 fix regression with weird status expand animation 2019-09-07 16:22:56 +02:00
Conny Duck 653d77bab2 fix crash in StatusBaseViewHolder 2019-09-07 13:14:16 +02:00
kyori19 c11ea7ae80 Merge remote-tracking branch 'tuskyapp/master' 2019-09-07 17:55:52 +09:00
Konrad Pozniak 344863b5d4
Add audio support for timelines (#1466)
* Add minimal audio support for timelines

* fix attachment description formatting
2019-09-05 21:07:01 +02:00
kyori19 c564c8f55f [name-hitbox] Open account profile when select name 2019-09-05 21:29:45 +09:00
kyori19 6f1c59d031 [notestock] Implement Notestock search 2019-09-05 21:29:45 +09:00
Billy Brawner 0b1c3d6c40 [visibility-icon] Add visibility icons to statuses 2019-09-05 21:29:45 +09:00
kyori19 573be935a7 [quote] Implement quote feature 2019-09-03 23:08:13 +09:00
kyori 27a9fc1438 [unleakable] Add visibility 'unleakable' 2019-09-03 22:26:44 +09:00
Ivan Kupalov 444df322a7 Load sensitive media previews only when shown (#1439) 2019-08-17 21:37:26 +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
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 707f3e605c
fix build warnings (#1331) 2019-06-24 22:15:31 +02:00
Konrad Pozniak ac2e16e08c
fix image transition from timeline to ViewMediaActivity (#1348) 2019-06-24 20:52:38 +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 ab4f981955
fix conversation avatars (#1324) 2019-06-17 13:14:44 +02:00
charlag 3f613dc56f Minimal screen reader support for polls 2019-05-26 15:56:26 +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 561d4cc284
support custom emoji fonts in poll options (#1250) 2019-05-10 20:08: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 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 8d01e54caf
add support for multiple choice polls (#1212) 2019-04-28 09:58:17 +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
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
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
Ivan Kupalov b66582654d Fix issue with content warnings not being expanded from a11y delegate (#1167) 2019-03-30 09:10:34 +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
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
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
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
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
Conny Duck eeaadea905 Revert "Generalize url scheme parsing/highlighting (#1008)"
This reverts commit 85610a8311.
2019-02-11 14:43:57 +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
Konrad Pozniak 15ca16e06f
fix long toots not collapsing correctly in timelines (#976) 2019-01-11 20:05:15 +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