* 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
* 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
* 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)
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* +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
* 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
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.
* 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.
* 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
* 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
* 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
* 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