Commit Graph

149 Commits

Author SHA1 Message Date
Levi Bard 7e1f5edeca Behave like Mastodon web ui and only count URLs as 23 characters when composing (#629)
* Refactor-all-the-things version of the fix for issue #573

* Migrate SpanUtils to kotlin because why not

* Minimal fix for issue #573

* Add tests for compose spanning

* Clean up code suggestions

* Make FakeSpannable.getSpans implementation less awkward

* Add secondary validation pass for urls

* Address code review feedback

* Fixup type filtering in FakeSpannable again

* Make all mentions in compose activity use the default link color
2018-05-16 19:14:26 +02:00
Levi Bard 30fffcd9ca When replying, set default post visibility to the most restrictive of: original post visibility, default visibility preference. (#641)
Issue #636
2018-05-09 23:04:00 +02:00
Conny Duck 67cf199b03 fix bug where media is not uploaded after ComposeActivity recreation 2018-05-06 13:02:02 +02:00
remi6397 e8c79cce65 Notification tweaks: Grouping and Quick Reply button (#587)
* Added notification grouping and Quick Reply button

* Legal stuff

* Coding style

* Check whether account still exists when sending a quick reply

* Add "compose" button

* Polish translation

* Improve strings

* Code style

* Cancel notification when user hits "compose" button

* Notification counter

* Make sure to open ComposeActivity for notification recipient account

* Add ability to request account switch when starting an activity
2018-05-06 11:07:10 +02:00
Levi Bard ff7c54e739 Add tests for the custom toot character limit functionality (#599)
* Query instance for toot character limit
Fixes #393

* Move maximumTootCharacters to instance field

* Add caching for maximum toot characters, expanding on the emoji list storage

* Update formatting per review feedback

* Fix compose activity tests

* Rename mastodon api point for nicer interaction with kotlin

* Default emoji list to empty list instead of null, to appease json converters in failure cases

* Add test coverage for custom toot character limit setting

* Fix compiler warnings
2018-04-29 10:08:25 +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
Konrad Pozniak 20033f844a fix emoji & toot size limit caching 2018-04-23 09:26:03 +02:00
Konrad Pozniak 23f7f04aa8 improve "save draft" dialog show condition 2018-04-22 21:04:19 +02:00
Levi Bard e2adddf7b8 Query instance for toot character limit (#571)
* Query instance for toot character limit
Fixes #393

* Move maximumTootCharacters to instance field

* Add caching for maximum toot characters, expanding on the emoji list storage

* Update formatting per review feedback

* Fix compose activity tests

* Rename mastodon api point for nicer interaction with kotlin

* Default emoji list to empty list instead of null, to appease json converters in failure cases

* Use empty list helper

* Fix database migration
2018-04-22 10:35:46 +02:00
Conny Duck 7f5f0e8dd8 show error message when instance has no custom emojis 2018-04-17 22:39:55 +02:00
Conny Duck ae02fba437 remove unneeded takePersistableUriPermission
was a mistake to add this in the first place
2018-04-14 18:17:29 +02:00
Conny Duck 28a85639ed upgrade minSdkVersion to 19 2018-04-14 13:56:48 +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 2851e4d38b make avatar rounding independent of image size 2018-03-30 19:08:24 +02:00
Ivan Kupalov a5cffe0fea Add Dagger (#554)
* Add Dagger DI

* Preemptively fix tests

* Add missing licenses

* DI fixes

* ci fixes
2018-03-27 19:47:00 +02:00
Ivan Kupalov 28e46c9cc0 Add ComposeActivity tests. Add ServiceLocator (#542) 2018-03-09 22:02:32 +01:00
Ivan Kupalov e82c9dcd2a Compose close dialog + focus fix (#539) 2018-03-05 22:43:13 +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 49a74f57a5 fix a crash in ComposeActivity when trying to share images while logged out 2018-02-25 15:41:45 +01:00
Conny Duck 1a3907936d fix crash in ComposeActivity when account has no profile picture set 2018-02-08 19:17:08 +01:00
Konrad Pozniak 92ae463b38
Multi account feature (#490)
* basic implementation

* improve LoginActivity

* darken drawer background image

* add current avatar in ComposeActivity

* add account name to logout dialog

* multi account support for notifications

* multi account support for notifications

* bugfixes & cleanup

* fix bug where somethings notifications would open with the wrong user

* correctly set active account in SFragment

* small improvements
2018-02-03 22:45:14 +01:00
Conny Duck 3c795c6eef upgrade to minSdkVersion 18, fix some lint warnings 2018-01-31 21:57:50 +01:00
Ivan Kupalov 0426e8725a Set caption for media (#500) 2018-01-08 23:16:21 +01:00
Conny Duck fbf64fa1e9 fix NPE in MediaUtils.getMediaSize 2017-12-05 21:48:17 +01:00
Conny Duck e5516749ed stop cursor from jumping when upload finishes while composing toot 2017-12-05 20:56:42 +01:00
Konrad Pozniak 41233a837b
UI Improvements (#445)
UI Improvements
2017-11-30 20:12:09 +01:00
Conny Duck 1c2a647569 improve default post privacy to work like web mastodon, add default post privacy option 2017-11-27 20:11:31 +01:00
Ivan Kupalov 2575b16dad Save reply info in draft, refactor (#449)
* Save reply info in draft, refactor

* Handle replying to deleted status
2017-11-16 19:18:11 +01:00
Conny Duck 305d28a5c1 fix some lint warnings, remove unused code 2017-11-07 15:31:44 +01:00
Conny Duck a2c361914b fix a crash in ComposeActivity where a dialog was canceled that was already removed from the window 2017-11-07 15:01:20 +01:00
Conny Duck 9df3836665 prevent a crash in ComposeActivity when ContentResolver raises a SecurityException 2017-11-02 21:18:39 +01:00
Conny Duck 2dfd83ef97 adding image keyboard support (and some cleanup) 2017-11-01 21:56:38 +01:00
Ivan Kupalov 62f4837135 Reply improvements (#432)
* Refactor ComposeActivity intent. Fix bug with URLs

When user saved toot link was removed from the text field itself,
not only from the text to be saved.

* Show what you reply to

Closes #119
2017-11-01 20:59:29 +01:00
Ivan Kupalov 15e37576e5 Add media upload progress. Closes #412 (#426) 2017-10-29 22:18:45 +01:00
Ivan Kupalov bc59d4d938 Fix issues with media uploads restoring. Fixes #419. Fixes #308. (#425) 2017-10-28 22:24:26 +02:00
Ivan Kupalov df4dfa7766 Stop adding link info when composing toot (#418) 2017-10-27 13:19:12 +02:00
Conny Duck d9bbb1be71 should fix a problem with autocomplete and some keyboards 2017-10-23 22:55:43 +02:00
Conny Duck f2f3be37b3 cleanup code, remove some unneeded files 2017-10-18 00:20:50 +02:00
Conny Duck c3ffed56da fix a bug where saving a toot with attached media would crash the app 2017-10-17 09:38:36 +02:00
Conny Duck 71743890b0 rounded corners for avatar placeholder 2017-08-11 22:41:29 +02:00
Vavassor 6b3dd30527 Fixes URLs being deleted erroneously when multiple images are added in the composer. 2017-07-30 17:16:32 -04:00
Vavassor 4f96d850cc Fixes a crash when autocompleting a mention, second try. (previous fix was commit ab537ef3cb) 2017-07-28 12:36:54 -04:00
Vavassor 239ebaf9b2 Consolidate the two media buttons in the composer. 2017-07-27 22:40:58 -04:00
Vavassor f3b5087c52 Adds save draft button to composer. 2017-07-27 00:56:53 -04:00
Vavassor 42a49fbd4e Updates the upload size limit and correct it to power of two numbers of bytes as it actually always was. 2017-07-26 00:12:02 -04:00
Vavassor 2ed979d7fd Fixes a crash and errors associated with a URL pasted into the composer being edited before its metadata is loaded. 2017-07-25 19:23:37 -04:00
Vavassor 6e366a1b84 Give up 2017-07-20 22:29:29 -04:00
Vavassor ab537ef3cb Fixes a crash while autocompleting a mention. Also, a small bit of refactoring. 2017-07-20 17:54:41 -04:00
Vavassor f6c309e7db Fixes a crash when a thumbnail for an image attachment fails to load. 2017-07-19 00:28:36 -04:00
Vavassor 51e2b7c949 Fixes a few content descriptions and re-titles the Drafts page. 2017-07-18 22:32:13 -04:00