Commit Graph

95 Commits

Author SHA1 Message Date
Konrad Pozniak cd6766c261
hide toot content TextView when its empty (#969) 2018-12-27 22:32:14 +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
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
Konrad Pozniak 7bdc22aa28
small improvements for viewholders (#860) 2018-09-28 17:15:01 +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
kyori 589188e27d Prevent creating new object in setCreatedAt 2018-08-20 22:51:30 +09:00
kyori ad888854bc Use SimpleDateFormatter repeatedly. 2018-08-20 20:56:22 +09:00
kyori 4264fc42d6 Add process for when the createdAt is null. 2018-08-20 19:29:58 +09:00
kyori b4bb80c4d5 Stop initializing String. 2018-08-20 17:47:19 +09:00
kyori 219eafe6fc Prevent query SharedPreference in adapters. 2018-08-17 14:42:15 +09:00
kyori ca3a5791e3 Show absolute time 2018-08-16 22:51:23 +09:00
Conny Duck b9e433c77f fix crash in ViewThreadFragment 2018-08-15 11:20:57 +02:00
Ivan Kupalov 133808891d Add RoundedImageView for avatars (#739)
* Add RoundedImageView for avatars

* RoundedImageView: Remove unused things, fix touchable area
2018-07-30 15:36:22 +02:00
Konrad Pozniak e8d1b16b39
improve custom emoji support (#687) 2018-06-24 09:53:23 +02:00
Paul 30856a2f82 Enable boosting of own private toots, closes #664 (#666) 2018-05-28 21:29:06 +02:00
Ivan Kupalov 23d84dfa66 Show image descriptions in gallery (#630)
* Add circleci

* Commit to maybe fix ci

* Suppress false positives in lint

* Disable linting for tests in ci

* Add image descriptions to gallery

* Fix test

* [CI] Attempt to fix OOM error

* [CI] Attempt to fix OOM error, 2

* Add option to open status from media

* fix theme issue

* increase linespacing on media description
2018-05-10 20:13:25 +02:00
Konrad Pozniak 27b4cf8739
1.8 fixes (#637)
* fix lint warnings

* upgrade dependencies

* auto cancel notifications

* improve dependency injection

* fix tests

* remove old comment from BaseActivity

* fix missing injectors
2018-05-08 19:15:10 +02:00
Konrad Pozniak 89f93eab85
Fix SparkButtons (#608)
* fix the SparkButtons

* dont notify adapter after boost/fav
2018-04-28 22:59:46 +02:00
Ivan Kupalov f3c6abdd4d Add expand/collapse button for threads (#609) 2018-04-28 16:17:01 +02:00
Konrad Pozniak d17ff3eb0f fix problems with selectable text in detailed status 2018-04-22 16:34:02 +02:00
Konrad Pozniak 27eefbf65a
ComposeActivity improvements (#548)
* do not add media urls to status text

* add scrolling to content

* add arrow icon and animation to replying-to toggle

* remove unnecessary compose_button_colors.xml

* improve toot button

* improve bottom bar, add bottom sheet for compose options, dedicated cw button

* fix crash on Android < API 21

* move media picking from dialog to bottom sheet

* add small style tootbutton

* fix colors/button background for light theme

* add icons to media chose bottom sheet

* improve hide media button, delete unused styles

* fix crash on dev build when taking photo

* consolidate drawables

* consolidate strings and ids, add tooltips to buttons

* allow media only toots

* change error message to show max size of upload correctly

* fix button color

* add emoji

* code cleanup

* Merge branch 'master' into compose_activity_refactoring

# Conflicts:
#	app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java

* fix hidden snackbar

* improve hint text color

* add SendTootService

* fix timeline refreshing

* toot saving and error handling for sendtootservice

* restructure some code

* convert EditTextTyped to Kotlin

* fixed pick media button disabled color

* force sensitive media when content warning is shown

* add db cache for emojis & fix tests

* reorder buttons to match mastodon web

* add possibility to cancel sending of toot

* correctly delete sent toots

* refresh SavedTootActivity after toot was sent

* remove unused resources

* correct params for toot saving in SendTootService

* consolidate strings

* bugfix

* remove unused resources

* fix notifications on old android for SendTootService

* fix crash
2018-04-13 22:37:21 +02:00
Konrad Pozniak 3708421362 add new avatar placeholder 2018-03-30 19:46:36 +02:00
Konrad Pozniak 2851e4d38b make avatar rounding independent of image size 2018-03-30 19:08:24 +02:00
Conny Duck 98b652b7a1 fix crash in StatusBaseViewHolder 2018-03-15 22:08:12 +01:00
Levi Bard 043ac58254 improve content warning button
* Use the entire content warning text + button as the hitbox for the "Show more/less" toggle

* Move the content warning toggle button to its own line and give it a little more space

* Move content warning elements into parent layout, remove now-superfluous FlowLayout

* Use marginTop/Bottom instead of Vertical, which is only in sdk 26+

* Update minimum width for content warning toggle button
2018-03-15 19:15:12 +01:00
Konrad Pozniak 71954a277e
convert entity classes to Kotlin data classes (#526)
* convert entity classes to Kotlin data classes

* more data classes, code style
2018-03-03 13:24:03 +01:00
Conny Duck ed60cc3a78 gracefully handle null statuses in notifications 2018-03-01 21:10:10 +01:00
Konrad Pozniak 41233a837b
UI Improvements (#445)
UI Improvements
2017-11-30 20:12:09 +01:00
charlag 74d6736afc Make status placeholder abstraction cleaner 2017-11-07 12:44:19 +01:00
Conny Duck 80a10c1ac1 implement "load more" placeholder 2017-11-04 21:57:30 +01:00
Conny Duck 2d390f6603 change default of chrome custom tabs setting to false 2017-10-30 10:48:27 +01:00
Conny Duck b213941c5b improve custom emoji size/padding/alignment, fix jumping of text when emojis are loaded 2017-10-24 23:10:15 +02:00
Ivan Kupalov 3054980d74 Fix deprecated BitmapDrawable constructor (#413) 2017-10-24 22:57:44 +02:00
Ivan Kupalov 938229d7d4 Fix custom emoji size (#407)
Now custom emoji images adapt to the font size.
2017-10-23 23:04:53 +02:00
Ivan Kupalov 3adef27bbb Load custom emoji in statuses (#400) 2017-10-19 15:25:04 +02:00
Conny Duck 0789f048e6 fix typo in preference key 2017-10-18 22:18:44 +02:00
Conny Duck 30312e0e55 implement notification channels, use system notification settings on android Oreo 2017-10-18 22:18:07 +02:00
Conny Duck f2f3be37b3 cleanup code, remove some unneeded files 2017-10-18 00:20:50 +02:00
Konrad Pozniak 25a489fe03 Merge pull request #378 from torrentcome/#377
(#377) hide sensitive images after showing them
2017-10-17 09:44:31 +02:00
Konrad Pozniak 1297a35e9b Merge pull request #386 from lenchan139/master
add option: always show all sensitive content without warning
2017-10-17 09:44:19 +02:00
Len Chan c0a5e55f47 add option: always show all sensitive content without warning 2017-09-19 23:19:18 +08:00
torrentcome 87de285fe8 (#377) hide sensitive images after showing them
-The web client overlays a small eye button over sensitive images after they've been shown that re-hides them
2017-08-30 14:22:12 +02:00
Conny Duck 71743890b0 rounded corners for avatar placeholder 2017-08-11 22:41:29 +02:00
Vavassor cb1e8eaea7 Cleans up the distinction between detailed and normal status view holders. 2017-08-03 17:26:26 -04:00