Commit Graph

1393 Commits

Author SHA1 Message Date
Konrad Pozniak 5f37192f36 use the correct settings in SearchFragment (#1034) 2019-02-11 21:24:43 +01:00
Conny Duck dc836bcae8 upgrade deps, fix some lint warnings 2019-02-11 16:59:01 +01:00
Conny Duck f4bf446a90 Revert "Generalize url scheme parsing/highlighting (#1008)"
This reverts commit d54599a570.
2019-02-11 14:43:57 +01:00
Conny Duck 8f9516a491 fix share chooser dialog design 2019-02-08 17:42:55 +01:00
Levi Bard 549789b283 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
marcin mikołajczak f3e57bce1e i18n: Update Polish translation🇵🇱 (#1029)
Signed-off-by: Marcin Mikołajczak <me@m4sk.in>
2019-02-05 20:13:09 +01:00
lenchan139 491af07b68 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 e67127f39d 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 d54599a570 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 021a5112b9 Update Crowdin configuration file 2019-02-01 19:47:26 +01:00
Ivan Kupalov 3ce10d2a7f 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 cfb43c34ac Fix empty state for account media, fix tablets (#1018) 2019-01-31 18:31:15 +01:00
Konrad Pozniak 5369deee08 fix autocomplete of usernames (#1019) 2019-01-30 22:10:05 +01:00
Konrad Pozniak 06c5c2d537 update my mastodon acc in README.md 2019-01-30 20:51:11 +01:00
Ivan Kupalov e0c8490bb5 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
Sylke Vicious 6df57b23e1 Updated italian translation (#1010)
* Updated italian translation

* Updated italian translation

* Fix for CircleCI failing test

* Updated italian translation
2019-01-28 11:05:42 +01:00
Ivan Kupalov cab7a78044 Fix crash in media tab, fix #1005 (#1007) 2019-01-28 11:05:13 +01:00
Ivan Kupalov c5dcc639a4 Add hashtag autocompletion, closes #769 (#1001)
* Add hashtag autocompletion, closes #769

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

* Make TabLayout scrollable.
2019-01-21 08:37:25 +01:00
Konrad Pozniak 0230f79a42 never use 0 account ids to prevent caching problems (#999) 2019-01-19 21:14:23 +01:00
Levi Bard 2de1ee661d 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 ff6ca5580f Add character counter to profile bio field. #881 (#991) 2019-01-17 22:15:06 +01:00
Levi Bard b61a3c68e8 Implement "Open status as (another account)" #958 (#988) 2019-01-16 20:50:09 +01:00
Levi Bard 5842a57f1d 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 1ef9baad93 fix proguard issue 2019-01-15 20:53:38 +01:00
Conny Duck dff6b27553 update gradle and build tools 2019-01-15 20:50:50 +01:00
Conny Duck 9899eff8d2 fix build 2019-01-14 22:29:12 +01:00
Ivan Kupalov cec5444e22 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 3c754e1509 Fix typo (#987)
* Optimize imports

* Fix typo in 'replyingStatusAuthor'
2019-01-14 21:57:22 +01:00
Ivan Kupalov d6392520c6 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 683ccd6f4f fix mentions and more menu after a fresh login (#986) 2019-01-11 22:07:25 +01:00
Konrad Pozniak 7969f9cc4d fix long toots not collapsing correctly in timelines (#976) 2019-01-11 20:05:15 +01:00
Ivan Kupalov 62b0efc1f5 Fix layout issue with narrow timelines (#982) 2019-01-11 07:36:14 +01:00
Sylke Vicious 720c135727 Updated italian translation (#979)
* Updated italian translation

* Updated italian translation

* Fix for CircleCI failing test
2019-01-10 20:42:14 +01:00
Ivan Kupalov 188912fcad Fix layout issue with long CWs (#978) 2019-01-10 20:41:39 +01:00
Ivan Kupalov baab4a9fa3 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
Konrad Pozniak fcff99a1b9 fix multiline account field alignment 2018-12-29 18:37:12 +01:00
Konrad Pozniak 97fcd96306 fix radiobutton size in compose options 2018-12-29 00:02:29 +01:00
jchmrt 5bdee9329a 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
Pellaeon Lin 721c1f273f Update zh-rTW translation (#930)
* Update zh-rTW translation

* Add missing translation

* Copy zh-rTW strings to HK and MO for now, per @connyduck 's request
https://github.com/tuskyapp/Tusky/pull/930#issuecomment-450240996

Note that this should not be the final solution, HK and MO should be
able to understand the TW variant, but they're still different.
2018-12-28 15:39:02 +01:00
Konrad Pozniak b052338be0 hide toot content TextView when its empty (#969) 2018-12-27 22:32:14 +01:00
Konrad Pozniak 360d0ad598 fix AccountActivity tabs on tablets 2018-12-27 22:31:42 +01:00
Konrad Pozniak 82a632eecc 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
Mostafa Ahangarha c0f7c4d8c1 Improved Persian translation (#965)
I have made these two thing:

- Made several modification to make the existing translation improved
- Added missing stings
2018-12-25 20:07:20 +01:00
Mostafa Ahangarha ac66c50673 Improve RTL support (#964)
By making these changes, texts in relevant pages will appear currectly
in RTL layout.
2018-12-25 20:07:03 +01:00
Ivan Kupalov ff0ce91599 Export Room schemes (#963) 2018-12-25 20:06:28 +01:00
kyori19 9fe7aacd6d Fix wrong visibility icon(tuskyapp#901) (#960) 2018-12-20 18:25:36 +01:00
Conny Duck 079c792d0c update deps 2018-12-18 22:05:33 +01:00
Conny Duck 65d7c9ff4c remove more Kotlin null check methods from release bytecode 2018-12-17 23:36:59 +01:00
Conny Duck 265fa3c984 fix weird resizing of ComposeActivity when emojis are loaded on tablets 2018-12-17 21:58:52 +01:00