Commit Graph

70 Commits

Author SHA1 Message Date
leopoldsedev
8d4a331bba Rework undo deletion logic.
Previously the MessageFacade and MessageStateHolder both had their own
state of the last deleted message, which was redundant. Now only
MessageStateHolder governs the state of a pending deletion and
MessageFacade handles commiting the deletion to the server.
2020-02-18 20:02:52 +01:00
leopoldsedev
0ebeeec35e Make new methods for undoing deletions synchronized. 2020-02-18 20:02:52 +01:00
leopoldsedev
ed8689daa0 Add null-check of swipe icon. 2020-02-18 20:02:52 +01:00
leopoldsedev
6b00bfb63c Don't scroll to position when undoing a deletion.
This seems to cause an issue where onSwipe is not being called anymore
afterwards. Steps to reproduce:
1. Delete a message
2. Scroll a little bit down
3. Undo delete
4. Try delete again
-> Swiping works, but callback is not being called.
2020-02-18 20:02:52 +01:00
leopoldsedev
c22c8c1417 Implement undo snackbar when deleting messages by swiping.
When swiping away a message it is only removed from the local message
lists and a snackbar appears. When the snackbar is dismissed or the user
deletes another message the delete request is sent to the server. If the
user presses "undo" on the snackbar the message is reinserted into the
local lists at its previous position.
2020-02-18 20:02:52 +01:00
leopoldsedev
1d0ec1fe30 Remove message delete button. 2020-02-18 20:02:52 +01:00
leopoldsedev
5905e84d13 Add background color and icon when swiping. 2020-02-18 20:02:52 +01:00
leopoldsedev
5fa5711f36 Implement swiping left/right to delete messages (closes #38). 2020-02-18 20:02:52 +01:00
leopoldsedev
fd07cad969 Replace ListView with RecyclerView for the message list. 2020-02-18 20:02:52 +01:00
Michael Zöller
668e050add Add handling for extra "android::action:onReceive:intentUrl" 2020-02-17 17:09:38 +01:00
leopoldsedev
f8422f4ef1 Fix SwipeRefreshLayout and ListView interaction.
Scrolling interaction works out of the box only if ListView is the only
child of SwipeRefreshLayout.
See https://stackoverflow.com/a/26296897
2020-02-11 18:45:29 +01:00
leopoldsedev
737ad194e9 Various UI enhancements.
- Add information (link to documentation) when no messages are present
- Add example URL in LoginActivity to indicate the expected format
- Fix capitalization in UI
2020-02-11 18:45:29 +01:00
leopoldsedev
15f4e8647f Fix freeze when login URL has trailing whitespace.
The problem is that HttpUrl.parse parses URLs with trailing whitespace without problems, but during the URL parsing in ClientFactory an exception is thrown in that case.
Other errors when instantiating the API client are now handled as well.
2020-02-11 17:35:15 +01:00
mzoeller
7116ef522c Clear notifications on open app (#93) 2020-02-06 18:39:44 +01:00
mzoeller
a4cbd885d0 Add support for opening urls when clicking on notifications (#91) 2020-02-05 19:13:06 +01:00
Dylan Parker
9571898287 Add cache for images (#88) 2019-12-14 08:57:39 +00:00
Jannis Mattheis
d9113a8a95 Update markwon 2019-11-28 22:52:08 +01:00
Jannis Mattheis
ef6ea30162 Add gif & tables plugin 2019-04-14 14:54:29 +02:00
Jannis Mattheis
5a9fced30d Images plugin allows images 2019-04-14 14:54:29 +02:00
Jannis Mattheis
69af6786ee MovementPlugin fixes clicking links
Without this plugin links aren't clickable.
2019-04-14 14:54:29 +02:00
Jannis Mattheis
eb515673f4 Autolink web prevents other markdown links from beeing rendered 2019-04-14 14:54:29 +02:00
Jannis Mattheis
be2b1e3528 Use extra property to determine the content of messages 2019-04-07 14:39:18 +02:00
Jannis Mattheis
174ab572d7 Add markdown support for messages 2019-03-30 11:10:06 +01:00
Jannis Mattheis
3b2fc90569 Show full url in connection string 2019-03-08 11:41:36 +01:00
Jannis Mattheis
91ac373642 Update code to use new client 2019-02-22 19:41:04 +01:00
Jannis Mattheis
f713ba4915 Fix race condition while loading messages
Images didn't load correctly when the following scenario occurred:
* ApplicationHolder#request
* MessagesActivity.SelectApplicationAndUpdateMessages#execute
* MessagesActivity.SelectApplicationAndUpdateMessages#doInBackground
  - method returns List<MessageWithImage>, but images are "null" because
    apps aren't loaded yet.
* MessagesActivity#onUpdateApps
  - Now apps were loaded and cached.
* MessagesActivity.SelectApplicationAndUpdateMessages#onPostExecute
  - receives List<MessageWithImage> from #doInBackgroud with "null" images
-> Messages with "null" images are rendered in the ListView
2019-02-17 19:36:00 +01:00
饺子w
67daf8dc2f Support URLs with path prefix (#46)
See gotify/server#127 gotify/server#122
2019-02-17 19:05:30 +01:00
eternal-flame-AD
0c3ebb9bce Remove obsolete reconnect callbacks
removes obsolete reconnect callbacks scheduled before
network reconnects to prevent unwanted reconnection

also renamed WebSocketConnection.onFailure to onNetworkFailure to clear confusion
2019-01-06 19:21:40 +08:00
Jannis Mattheis
38681012a6 Wait for network when websocket connection failed 2019-01-04 22:47:10 +01:00
Jannis Mattheis
7da23cf94a Limit reconnect timeout 2018-12-22 18:02:14 +01:00
Jannis Mattheis
7626046da4 Add warning message when using http 2018-12-22 17:04:13 +01:00
Jannis Mattheis
95aa9b3224 Merge pull request #33 from ialokim/foreground-notification
Some changes to foreground notification (channel)
2018-12-22 16:42:40 +01:00
Ialokim
33388b426b added some lines to get foreground notification (a little) less intrusive 2018-12-16 17:51:31 +01:00
Marcel Schwarz
d35e475408 Change class variable to local variable 2018-12-12 21:47:51 +01:00
Marcel Schwarz
e8690ca28b Start Gotify WebSocketService on boot completed 2018-12-12 20:42:04 +01:00
Jannis Mattheis
d4c6273214 Migrate gotify to new client 2018-11-17 12:06:06 +01:00
Jannis Mattheis
3a9da353b4 Change client to retrofit2 2018-11-17 12:06:06 +01:00
Jannis Mattheis
4b1890202c Add logs button to Login 2018-11-12 18:10:54 +01:00
Jannis Mattheis
0e2260a031 Merge pull request #22 from schwma/master
Map Gotify message priorities to notification channels
2018-11-11 17:23:22 +01:00
schwma
abd40ea56c Enable vibration by default for high and default importance notification channels 2018-11-11 16:52:21 +01:00
Galen Abell
41949b49df Removed catch-all hostname verifier if a cert is present 2018-11-11 09:47:02 -05:00
schwma
63af9d458d Adjust notification channel names to include their corresponding gotify priorities 2018-11-11 15:22:22 +01:00
schwma
52d9329f50 Fix formatting as suggested by spotlessJava 2018-11-11 03:16:21 +01:00
schwma
4c2902a39e Map Gotify message priorities to notification channels 2018-11-11 02:37:39 +01:00
Galen Abell
ad5be385e8 Added local Picasso instance instead of singleton
- MessagesActivity now constructs a new Picasso instance each onCreate
  and passes it to ListMessageAdapter
2018-11-10 15:14:17 -05:00
Galen Abell
d8d9815d9b Merge branch 'master' of github.com:gotify/android into feature/self-signed-ssl 2018-11-10 11:02:25 -05:00
Galen Abell
24e0495f19 Cherry-picked Advanced Settings dialog
- Switched raw strings to string resources

- Removed unused fields / views from LoginActivity

- Reset 'Check Version' button text when changing SSL settings

- Fixed formatting
2018-11-10 10:59:48 -05:00
Jannis Mattheis
bcfa8ac221 Use an dialog to show advanced settings 2018-11-10 10:43:40 -05:00
Galen Abell
78a7f1319e Fixed Picasso + refactors
- Removed comment

- Moved SSLSettings to its own top-level class

- Fixed picasso not setting SSL settings and failing to load images over
  self-signed connection
2018-11-10 10:40:48 -05:00
Galen Abell
8e2d90ef50 Merge request changes
- Moved certificate-related utilities to separate class

- Added settings method to return an entire SSLSettings object; refactored
  methods using separate parameters to take single SSLSettings parameter

- Advanced Settings section on login page now hides / shows along with
  other buttons to prevent it from showing up in front of the loading
  spinner

- Fixed star imports

- Refactored applySslSettings as per code from merge request

- Fixed formatting
2018-11-09 16:56:56 -05:00