Commit Graph

1280 Commits

Author SHA1 Message Date
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 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
Conny Duck 10024221b6 fix inconsistent post_privacy_names strings in translations 2018-12-17 20:54:09 +01:00
Conny Duck da23ac08bf improve dialog styling 2018-12-17 20:47:42 +01:00
Conny Duck 0d8dc6ef19 exclude unneeded license files from apk 2018-12-17 19:08:32 +01:00
Conny Duck 3efa0ab81c update proguard rules for okhttp 2018-12-17 16:01:35 +01:00
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
Conny Duck d2dbb955a5 Release 52 2018-12-12 20:53:26 +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
Conny Duck 000010f3ef add option to copy link of own toot to "more" menu
closes #928
2018-12-03 12:04:27 +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
dadosch a58388a730 Fix Typo in german translation (#943) 2018-12-03 10:52:25 +01:00
zital 0bc557ab98 Basque: orro -> tut (#936)
* orro -> tut

* orro -> tut
2018-11-30 21:14:00 +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 925e82e035 Release 51 2018-11-26 18:52:08 +01:00
Isak Holmström c4d9aef25f [sv] New strings translated. (#931)
* Updated with new strings, added new translations for mute

* Changed from nsfw to sensitive content

* translating new strings ++extra fixes

* Add files via upload

* [sv] New strings translated
2018-11-26 18:31:53 +01:00
Conny Duck 8884354999 fix NullPointerException in ViewImageFragment 2018-11-25 20:16:38 +01:00
Unai Tolosa Pontesta 2d97fabfeb Added Basque translations (#926)
* Added Basque translations

* zital

* zital
2018-11-25 19:42:50 +01:00
INAGAKI Hiroshi 073237fcb8 l10n: update Japanese translation (#929)
Updated Japanese translations and removed unnecessary spaces.

Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
2018-11-25 19:41:45 +01:00
Conny Duck 0d6eb76b9c Release 50 2018-11-19 16:39:49 +01:00
Sylke Vicious e41d9401f4 Updated italian translation (#925) 2018-11-19 15:51:58 +01:00
ButterflyOfFire f3a11855ef Update arabic translation (#923)
Update arabic translation.
2018-11-19 10:53:27 +01:00
ButterflyOfFire 5187abb744 Update french translation (#924)
Update french translation.
2018-11-19 10:53:15 +01:00
Evgeny Petrov 305f0acdee RU: Added missing string (#921) 2018-11-18 13:17:24 +01:00
Conny Duck 08440aed6e fix activity restart after theme switch 2018-11-18 12:29:11 +01:00
Conny Duck 2099943e52 update german translation 2018-11-18 11:34:06 +01:00
Conny Duck 8b3dbf54a1 fix crash on unknown media type 2018-11-17 16:17:47 +01:00
Conny Duck 401fdd7138 fix untranslateable String in Account preferences 2018-11-17 15:53:46 +01:00
Evgeny Petrov 22e2519916 Russian translation update (#919)
* Russian translation update

* Removed duplicate string
2018-11-16 18:30:48 +01:00
Conny Duck 94fc2209a7 remove erroneous strings to prevent crashes 2018-11-16 13:57:35 +01:00
Conny Duck 0531fc6902 update deps, fix some lint warnings 2018-11-16 13:31:03 +01:00
kyori19 3bded10419 Improve japanese translation. (#917) 2018-11-13 20:02:19 +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
Kévin Commaille e09c691286 Update and fix french translation (#914) 2018-11-12 21:42:21 +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
Manimaran.K d3bed81a82 Tamil translation (#890)
* Translation for Tamil language is done.

* Update Translation for Tamil
2018-11-01 14:51:59 +01:00
ButterflyOfFire 9612a98e24 Improve french translation 2018-10-31 17:04:49 +01:00
charlag d5f52a6e93 Formatted translation 2018-10-31 16:19:09 +01:00
charlag 4025420e75 Merge branch 'patch-3' of git://github.com/BoFFire/Tusky into BoFFire-patch-3 2018-10-31 16:17:43 +01:00
charlag 099b5474c6 Format translation 2018-10-31 16:10:35 +01:00
Quentí 80f857af74 [i18n] Occitan update 2018-10-28 00:28:39 +02:00
ButterflyOfFire f3228d3069 Update strings.xml 2018-10-27 23:44:25 +02:00
ButterflyOfFire 7e109b99cd Improving arabic translation
Improving arabic العربية translation and 100% translated. Enjoy !
2018-10-27 23:29:47 +02:00
charlag a65eaacdb1 Reformat translation 2018-10-27 18:50:02 +02:00
Sylke Vicious 2fac0b209c Fixed the unescaped aphostrope
Sorry, missed this one!
2018-10-26 16:10:01 +02:00
Sylke Vicious 0e6853ba9c Updated italian translation 2018-10-26 15:55:32 +02: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
Conny Duck f85deb3efb update build tools and kotlin 2018-10-14 16:30:12 +02:00
Paul 50ae9ba326 Improve french translation (#887) 2018-10-14 12:58:48 +02:00
Levi Bard d58aa01fde Focus content warning field on activation (#883)
Fixes #773
2018-10-12 21:53:04 +02:00