Commit Graph

9 Commits

Author SHA1 Message Date
Alibek Omarov 9fb8dbc732 app: all external references are now called Husky to not conflict with Tusky files 2020-05-28 04:53:56 +03:00
Alibek Omarov 3bcbc97bab compose: implement BBcode and HTML sending 2020-04-12 20:13:09 +03:00
Alibek Omarov 678ed81626 Merge upstream develop 2020-01-03 22:55:09 +03:00
Ivan Kupalov 8770fbe986 ComposeActivity refactor (#1541)
* Convert ComposeActivity to Kotlin

* More ComposeActivity cleanups

* Move ComposeActivity to it's own package

* Remove ComposeActivity.IntentBuilder

* Re-do part of the media downsizing/uploading

* Add sending of status to ViewModel, draft media descriptions

* Allow uploading video, update description after uploading

* Enable camera, enable upload cancelling

* Cleanup of ComposeActivity

* Extract CaptionDialog, extract ComposeActivity methods

* Fix handling of redrafted media

* Add initial state and media uploading out of Activity

* Change ComposeOptions.mentionedUsernames to be Set rather than List

We probably don't want repeated usernames when we are writing a post
and Set provides such guarantee for free plus it tells it to the
callers. The only disadvantage is lack of order but it shouldn't be a
problem.

* Add combineOptionalLiveData. Add docs.

It it useful for nullable LiveData's. I think we cannot differentiate
between value not being set and value being null so I just added the
variant without null check.

* Add poll support to Compose.

* cleanup code

* move more classes into compose package

* cleanup code

* fix button behavior

* add error handling for media upload

* add caching for instance data again

* merge develop

* fix scheduled toots

* delete unused string

* cleanup ComposeActivity

* fix restoring media from drafts

* make media upload code a little bit clearer

* cleanup autocomplete search code

* avoid duplicate object creation in SavedTootActivity

* perf: avoid unnecessary work when initializing ComposeActivity

* add license header to new files

* use small toot button on bigger displays

* fix ComposeActivityTest

* fix bad merge

* use Singles.zip instead of Single.zip
2019-12-19 19:09:40 +01:00
Alibek Omarov dfee6f1f98 markdown: now markdown mode is restored from drafts 2019-12-17 03:28:28 +03:00
Konrad Pozniak 51c6852492
Create polls (#1452)
* add AddPollDialog

* add support for pleroma poll options

* add PollPreviewView

* add Poll support to drafts

* add license header, cleanup

* rename drawable files to correct size

* fix tests

* fix bug with Poll having wrong duration after delete&redraft

* add input validation

* grey out poll button when its disabled

* code cleanup & small improvements
2019-08-22 20:30:08 +02: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
Levi Bard 690e612f8b 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
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