Commit Graph

199 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
Vavassor 857f39b480 Widens proguard to just keep everything under org.bouncycastle when minifying. Also fixes a bug where the composer's content warning is hidden after changing orientation. 2017-07-17 00:06:48 -04:00
Vavassor 8559a6d75c Corrects number localization and adjusts the padding of the reblog avatars in right-to-left layout direction. 2017-07-14 18:18:29 -04:00
Vavassor e4dff388d2 Improves right-to-left layouts in the most basic fashion. 2017-07-12 02:09:07 -04:00
Vavassor a1e007eb2a Adds saving media to drafts. 2017-07-11 21:49:46 -04:00
Vavassor 125c0e7e6c Saves content warnings in drafts. 2017-07-07 22:56:07 -04:00
torrentcome b6d4b388a5 Merge branch 'master' into #142/SaveToots
# Conflicts:
#	app/src/main/java/com/keylesspalace/tusky/TuskyApplication.java
2017-07-07 13:28:31 +02:00
torrentcome 47dccd81e7 (db) add the Update feature for each Draft we already have 2017-07-07 12:32:47 +02:00
torrentcome 76fca004ee (correction) fix some forgot code to present the pull request :D 2017-07-06 12:20:54 +02:00
torrentcome 87c1edb3d4 (medias) try to add medias 2017-07-05 16:36:14 +02:00
Vavassor 932a990fe4 Fixes bug where "The upload failed." error message shows up when media upload is canceled intentionally. 2017-07-02 17:55:18 -04:00
Vavassor b06dda47c1 Fixes a crash where photoUploadUri can be nullified if the activity is evicted from memory while taking a picture, so when it resumes and recreates it no longer has a valid URI. Closes #326 2017-07-02 17:45:13 -04:00
Vavassor 9e07c59565 Adjusts composer imports. 2017-07-02 16:34:10 -04:00
torrentcome b0f848b0f7 (db) insert toot with long click 2017-06-29 17:56:58 +02:00
torrentcome f79445f50a (clean) keep it simple , don't polluted ComposeActivity, commented and moving the code 2017-06-29 12:03:44 +02:00
torrentcome fec8e5c47c (db) insert + read 2017-06-28 19:33:54 +02:00
Vavassor 1dc9c87c2e Fixes public visibility being disabled when replying, and changes the default to public like non-reply posts. 2017-06-26 15:46:03 -04:00
Vavassor c5c6e8205a Fixes autocomplete list getting cut off in the composer if the user is using an app or launcher that hides the status bar. 2017-06-26 15:38:04 -04:00
Vavassor 7d7d5864d4 Adjusts the media label alignment in statuses. 2017-06-26 14:51:39 -04:00
Vavassor b1aa05694e Removes ButterKnife annotations. 2017-06-22 14:59:12 -04:00
Vavassor 18ebfa212e Minor writing style changes. 2017-06-22 14:01:25 -04:00
Vavassor 2e29088d65 Fixes cursor being placed after a media link when it is added in the composer. Also, adjusts a tinting error in the composer buttons. 2017-06-20 16:57:04 -04:00
Vavassor b9b5e58b50 Changes the NSFW button to a "hide media" icon in the composer. This is inspired in part by the upstream change tootsuite/mastodon#2696. But also NSFW was never a good description of this function. 2017-06-20 14:16:03 -04:00
Vavassor fcdb507ef0 Changes the autocomplete list to show the username, display name, and avatar of each suggestion for @ mentions. 2017-06-18 23:34:48 -04:00
Vavassor 74aa866647 Autocomplete @ mentions in the composer. Closes #103 2017-06-18 22:10:50 -04:00
torrentcome 2b9f19805f Merge branch 'master' into #136 2017-06-02 23:15:21 +02:00
Konrad Pozniak 7501fcaeaa Merge branch 'master' into log-improvement 2017-05-25 19:17:20 +02:00
Conny Duck 2eaff99b29 log some more exceptions 2017-05-25 17:21:11 +02:00
Conny Duck 1a39e58d3c remove unnecessary Log utility class, replace Exception.printStackTrace with logging 2017-05-23 21:34:31 +02:00
torrentcome b9d460e712 (bug of picasso) the Target wasn't load at the first time forget to read the documentation so , record the target in field change the way that works.
Now work fine.
2017-05-17 16:08:43 +02:00
Vavassor 6752d45d4b Initial client working for MQTT push notifications. 2017-05-16 22:19:34 -04:00
torrentcome 418fbd3b5c (share) add share functionality
- get the text shared and put it on the Clipboard
- pass by the same way that past for Download the information
2017-05-16 17:56:35 +02:00
torrentcome b1bbcb39d5 (ComposeActivity) clean up, automatique format and implementation of
- Share a link and extract the title, images, author's name #136
2017-05-16 10:43:32 +02:00
torrentcome 0a6a2e44c2 (view) create package view 2017-05-15 12:07:01 +02:00
Vavassor aa2394748c Reorganizes the whole codebase. 2017-05-04 18:55:35 -04:00
Vavassor f313884f7d Adds a link to the text of a post when media is attached. 2017-05-03 20:27:59 -04:00
Vavassor ab76121692 Change locked accounts to default visibility to "followers-only", and reorganizes the composer because it was getting cluttered. 2017-05-02 18:17:54 -04:00
Vavassor 1c1328449a Merge pull request #200 from tahnok/master
Make compose EditText TYPE_TEXT_FLAG_CAP_SENTENCES
2017-04-21 01:52:28 -04:00
Vavassor 681c70d056 Changes the icon for the visibility menu in the composer to match the current visibility. Also, fixes build errors with the dutch translation file. 2017-04-21 01:50:59 -04:00
Wesley Ellis 14fdc9ed15 Make compose EditText TYPE_TEXT_FLAG_CAP_SENTENCES 2017-04-18 22:10:48 -04:00
Raphael Michel 15088fa42a Allow taking photos directly from the app (closes #139) 2017-04-17 10:56:30 +02:00
Vavassor a33c259760 Ties composer readying state and control states together. 2017-04-17 00:29:47 -04:00
Vavassor cc0aaf6162 Fixes a couple cases in the composer where buttons enabled are out of sync with whether a status is already in flight. 2017-04-17 00:18:55 -04:00
Vavassor 962bd79d3f Merge branch 'error_handling_bug' of https://github.com/raphaelm/Tusky into raphaelm-error_handling_bug 2017-04-17 00:09:16 -04:00
Raphael Michel fce573f1ec Update thread view after sent reply (closes #74) 2017-04-15 19:59:06 +02:00
Raphael Michel ee4d0739db Re-enable controls after failed toot 2017-04-15 17:52:21 +02:00
Vavassor 03c0994879 Merge branch 'update_compose_while_posting' of https://github.com/theZacAttacks/Tusky into theZacAttacks-update_compose_while_posting 2017-04-11 18:35:54 -04:00
Zachary Epps 236fd3570f removed needless import 2017-04-10 13:51:57 -04:00
Zachary Epps b92900bda1 actually added the other files, whoops 2017-04-10 13:51:41 -04:00
Vavassor c9e7401fca Fixes a character limit bug. Closes #102 2017-04-10 13:34:33 -04:00
Vavassor 2ba35fae35 Merge branch 'inherit_warnings' of https://github.com/ntngrtltr/Tusky into ntngrtltr-inherit_warnings 2017-04-09 20:24:59 -04:00