Commit graph

3251 commits

Author SHA1 Message Date
Julius Linus
96437a133e
Notify me Later
- Added new Dialog Fragment
- Added API functions for handling reminders
- Added JSON Models for those reminders
- Implemented the reminder functions using MVVM

Signed-off-by: Julius Linus <julius.linus@nextcloud.com>
2023-08-31 10:31:21 +02:00
parneet-guraya
5f8ef074cd
remove player listener
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
2023-08-30 11:49:44 +02:00
Julius Linus
e1f538a9e6 message draft bug fix
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
2023-08-28 10:30:24 -05:00
Marcel Hibbe
ba8df45bc7
avoid falsely shown "Account scheduled for deletion" info
...by setting the correct context.

In removeCurrentAccount
the

WorkManager.getInstance(this) (introduced with commit 943286dd)

must be

WorkManager.getInstance(applicationContext)

because otherwise the worker is dropped when the activity is finished and might not do it's work beforehand (race condition?).
This results in users that keep the

scheduledForDeletion = true

so the next time someone tries to login with this user,

userManager.checkIfUserIsScheduledForDeletion(loginData.username!!, baseUrl!!).blockingGet()

in WebViewLoginController#parseAndLoginFromWebView

is true and

ApplicationWideMessageHolder.getInstance().messageType
is set to

ApplicationWideMessageHolder.MessageType.ACCOUNT_SCHEDULED_FOR_DELETION

which results in the "The account is scheduled for deletion, and cannot be changed" message in ServerSelectionController.

This is just a guess and i was not able to reproduce it.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-08-25 11:24:28 +02:00
Marcel Hibbe
2c936aaf5b
Merge pull request #3272 from parneet-guraya/issue/save-media-playback-state
Save media playback state
2023-08-25 10:43:57 +02:00
Julius Linus
e29ad8f734
detekt
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
2023-08-25 10:03:30 +02:00
rapterjet2004
cc0815de0f
fixed media recorder bug
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
2023-08-25 10:03:29 +02:00
parneet-guraya
3b557be58f
save media playback state
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
2023-08-25 13:16:53 +05:30
parneet-guraya
7e07cbd12a
make player reference null after releasing
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
2023-08-25 13:16:52 +05:30
Marcel Hibbe
bc425bc0d3
apply changes by ktlintFormat
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-08-24 09:45:57 +02:00
Marcel Hibbe
68bf1ba7f2
avoid file storage permission warning.
"Sharing files from storage is not possible without permission" popped up after app startup because notification permission was requested.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-08-24 09:36:19 +02:00
parneet-guraya
7ea075ea13 migrate to media3
Signed-off-by: parneet-guraya <gurayaparneet@gmail.com>
2023-08-23 16:22:51 +02:00
Smarshall
5e1cd4f718 Fixed Codacy Static Code Analysis issue 2023-08-23 17:51:12 +05:30
Smarshall
62a79fa144 Fixed Unresolved reference: ColorRole and Exceeded max line length issue 2023-08-23 17:04:28 +05:30
Smarshall
4121f538c0
Merge branch 'master' into Snackbar
Signed-off-by: Smarshall <99678760+Smarshal21@users.noreply.github.com>
2023-08-19 17:57:28 +05:30
Smarshall
a447196257 Replaced all the Toasts with Snackbar 2023-08-19 17:38:52 +05:30
Andy Scherzinger
9a1d501952 reformat code
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-08-12 17:05:42 +02:00
Andy Scherzinger
1b10c08d7e fix markdown checked item theming
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-08-12 17:05:42 +02:00
Andy Scherzinger
dea6645002 fix mention rendering
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-08-12 17:05:42 +02:00
rapterjet2004
c278183382 detekt
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
2023-08-10 14:47:17 +02:00
Julius Linus
31cedf0da5 Migration away from getScheme() calls
Signed-off-by: Julius Linus <julius.linus@nextcloud.com>
2023-08-10 14:47:17 +02:00
Andy Scherzinger
55bb557b26
fix placeholder rendering for parent messages (replied to text)
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-08-07 12:52:32 +02:00
Julius Linus
1af04d2bd3 Follow up fixes
- Larger Bar gap
- Centered time below play/pause button
- Time is the same color as the play/pause button

Signed-off-by: Julius Linus <julius.linus@nextcloud.com>
2023-08-02 14:14:59 -05:00
Julius Linus
2430f725d6 AudioUtils and Waveform Seekbar
- Created AudioUtils for processing audio messages
- Created Waveform Seekbar, for visualizing a FloatArray
- Time limit of about 5 seconds, else shows regular seekbar
- Also made mediaPlayer smoother
- Fixed time discontinuity bug when playing voice messages, but only on API 28 or higher
Signed-off-by: Julius Linus <julius.linus@nextcloud.com>
2023-08-01 12:35:15 -05:00
Julius Linus
e5afa96e26 In this PR
- Drafts are now saved in between rooms.

Signed-off-by: Julius Linus <julius.linus@nextcloud.com>
2023-08-01 10:34:49 -05:00
Marcel Hibbe
8dd8f745cb show 1h call duration info when screen is reopenend
+ make call duration bold for >= 1hour

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-07-28 18:02:37 +02:00
Marcel Hibbe
8e93a1936b show call time and hint for one-hour call
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-07-28 18:02:37 +02:00
Marcel Hibbe
75c154acf3
Avoid to fetchSignalingSettings in onMicrophoneClick
this led to duplicated call of fetchSignalingSettings.
because it's already called from checkDevicePermissions().
From my pov it shouldn't be triggered in onMicrophoneClick() again, at least i can not think of any scenario and while testing everything worked as expected.

The duplicated call was there since ever(?), but after implementing #3216 this also caused the call duration timer to be run twice.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-07-28 13:46:28 +02:00
Andy Scherzinger
c4290f11ca
Implement respecting the markdown rendering flag
...and fixing the reply ellipsizing for any reply messages

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-07-28 10:31:46 +02:00
Andy Scherzinger
4b89ceeb54
Implement status infos on chat view
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-07-28 10:04:29 +02:00
Andy Scherzinger
efc8a1a2dd Fix some magic numbers, bump score
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-07-27 12:40:12 +02:00
Marcel Hibbe
a941945400 convert CallActivity to kotlin
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-07-27 12:40:12 +02:00
Marcel Hibbe
b5529f869a convert CallActivity to kotlin
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-07-27 12:40:12 +02:00
Andy Scherzinger
c0deca51b9
implement permission check for notifications on Android 13
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-07-26 23:01:38 +02:00
Marcel Hibbe
80af04be9a remove effortlessPermissions lib
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-07-25 14:35:37 +02:00
rapterjet2004
6654f6aa74 WIP
Signed-off-by: rapterjet2004 <juliuslinus1@gmail.com>
2023-07-19 20:18:27 -05:00
rapterjet2004
21dbd65870 Fixed MicInputCloud + Detekt issues
Signed-off-by: Julius Linus <julius.linus@nextcloud.com>
2023-07-19 13:24:53 -05:00
Julius Linus
f0ba16a275
Issue 2790, allows for continuous voice recording on swipe up, and for previewing messages
- I did a bunch of UI logic in ChatActivity and view_message_input, mainly in setting up the recording interface
- I created a custom component, MicInputCloud, under the hood it's 3 ovals, with a hole cut in the center for the icon. The ovals are at around 50% opacity, and they each have their own rotations and size changes animated. General rotation speed and colors can be overridden by the activity implementing it.
- I also added a floating action button to activity_chat, to show when the voice recording is locked or not.
- I can replay or pause preview voice recordings before sending or deleting
- Preview voice recording is now smoother and click boxes are bigger and well defined
Signed-off-by: Julius Linus <julius.linus@nextcloud.com>
2023-07-19 11:42:41 +02:00
Marcel Hibbe
61ff44a643 add logging and minor refactoring
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-07-18 13:15:01 +02:00
Marcel Hibbe
4e52b7a7bd add checks to reconnect websocket
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-07-18 13:15:01 +02:00
Marcel Hibbe
2f32357b78 check if existing websocket is Connected
+ refactoring

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-07-18 13:15:01 +02:00
Julius Linus
bb45ebd3b8 Issue 3142
- Added duration of the voice message playing
- Fixed the seekbar bug, and made it more smoother

Signed-off-by: Julius Linus <julius.linus@nextcloud.com>
2023-07-14 11:32:15 -05:00
Andy Scherzinger
dcbc1771c6
remove ports from translatable strings
Resolves #3187

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-07-14 17:19:51 +02:00
Marcel Hibbe
e6a95d7190
fix typo in sessionId
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-07-13 16:02:55 +02:00
Marcel Hibbe
b0565f5149
check that session is the same before joining room locally without to send websocket message
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-07-13 16:00:59 +02:00
Marcel Hibbe
89aacbae95
fix typo
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-07-13 15:03:59 +02:00
Marcel Hibbe
d450ae7897
fix error message
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-07-13 15:03:08 +02:00
Marcel Hibbe
129606327e
set isConnected to false when websocket connection has been released
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-07-13 14:00:13 +02:00
Marcel Hibbe
8f3a3570e9
Add logging for websockets
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-07-13 13:32:43 +02:00
Marcel Hibbe
c3cb644558 Fix establishing of call connection when try to connect a second time on HPB
Everytime a second attempt was made to enter a call, the connection failed.
How to reproduce:

- Enter the ChatActivity
-> joins the room (so the new session is in the ApplicationWideCurrentRoomHolder)

- Start call
-> in the CallActivity we don't join again and instead execute callOrJoinRoomViaWebSocket()

- Call connection is successful

- Hangup on android
-> the ApplicationWideCurrentRoomHolder gets cleared (so also it's session)

- Staying in the chat and start the call another time
-> When we open CallActivity another time, ApplicationWideCurrentRoomHolder.sessionId is empty.Because of this, in joinRoomAndCall, joinRoom is executed again.
But as we are still in the room and have a session, joinRoom is problematic because on serverside in SignalingController - if there is still a session - it's considered as old.
So Nextcloud now sends a backend message (disinvite) to the external signaling controller that the session (of the first join) was removed.
So the External signaling server removes the session and closes the websocket. (The message for this might be improved, see https://github.com/strukturag/nextcloud-spreed-signaling/issues/512)

As the websocket is now closed, it won't be possible for the android app to send any signaling message anymore. There will just be the connecting screen and the call connection fails.

Solution for now:
ApplicationWideCurrentRoomHolder.getInstance().clear() should not be executed when hanging up, so the session won't be cleared and in the next attempt to start the call the room is not joined again mistakenly.
Instead to clear the `ApplicationWideCurrentRoomHolder`, only
setInCall(false);
setDialing(false);
are set so that the method isNotInCall() in ChatActivity remains working correctly.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-07-12 19:04:39 +02:00