- 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>
Exception java.lang.IllegalArgumentException: The style on this component requires your app theme to be Theme.AppCompat (or a descendant).
at com.google.android.material.internal.ThemeEnforcement.checkTheme (ThemeEnforcement.java:247)
at com.google.android.material.internal.ThemeEnforcement.checkAppCompatTheme (ThemeEnforcement.java:212)
at com.google.android.material.internal.ThemeEnforcement.checkCompatibleTheme (ThemeEnforcement.java:147)
at com.google.android.material.internal.ThemeEnforcement.obtainTintedStyledAttributes (ThemeEnforcement.java:114)
at com.google.android.material.textfield.TextInputLayout.<init> (TextInputLayout.java:472)
at com.google.android.material.textfield.TextInputLayout.<init> (TextInputLayout.java:451)
at com.google.android.material.textfield.TextInputLayout.<init> (TextInputLayout.java:447)
at com.nextcloud.talk.settings.SettingsActivity.askForPhoneNumber (SettingsActivity.kt:935)
at com.nextcloud.talk.settings.SettingsActivity.access$askForPhoneNumber (SettingsActivity.kt:105)
at com.nextcloud.talk.settings.SettingsActivity$checkForPhoneNumber$1.onNext (SettingsActivity.kt:915)
at com.nextcloud.talk.settings.SettingsActivity$checkForPhoneNumber$1.onNext (SettingsActivity.kt:908)
at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal (ObservableObserveOn.java:201)
at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run (ObservableObserveOn.java:255)
at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run (HandlerScheduler.java:124)
at android.os.Handler.handleCallback (Handler.java:942)
at android.os.Handler.dispatchMessage (Handler.java:99)
at android.os.Looper.loopOnce (Looper.java:211)
at android.os.Looper.loop (Looper.java:300)
at android.app.ActivityThread.main (ActivityThread.java:8294)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:580)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1028)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
# Send start/stop typing
Send "Typing" every 10 sec when there was a change
Send stop typing:
- when input is deleted
- when there was no input during the 10s timer
- when on leaving room
# Receive start/stop typing
Clear typing for participant after 15s if no start typing-message was received.
Use userId instead sessionId to manage typing participants. This ensures participants are not shown multiple times when using multiple devices with the same user (multisession). To get the userId via websocket, SignalingMessageReceiver and WebSocketInstance had to be modified to pass the CallWebSocketMessage in case the signalingMessage.type is related to typing. Not sure if this is the best solution but didn't find any other way.
Typing is not handled when the userId is of the own user (this could happen when using multiple devices)
In case userId is null (which happens for guests), their sessionId is used as key for the typingParticipants map.
# Other
Disable setting for typing indicator when no HPB is used + Avoid crash in chat when no HPB is used.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
When clicking on a conversation in conversation overview, restrict opening immediately.
If joinRoomWithPassword in ChatController is reached in any other way (for example by creating a new conversation while being in a call), then it's restricted to join the room.
All this is done to avoid NPE:
D/ChatController: pullChatMessages - pullChatMessages[lookIntoFuture > 0] - got response
W/System.err: java.lang.NullPointerException
W/System.err: at com.nextcloud.talk.controllers.ChatController.modifyMessageCount(ChatController.kt:2536)
W/System.err: at com.nextcloud.talk.controllers.ChatController.addMessagesToAdapter(ChatController.kt:2515)
W/System.err: at com.nextcloud.talk.controllers.ChatController.processMessagesFromTheFuture(ChatController.kt:2489)
W/System.err: at com.nextcloud.talk.controllers.ChatController.processMessages(ChatController.kt:2437)
W/System.err: at com.nextcloud.talk.controllers.ChatController.processMessagesResponse(ChatController.kt:2398)
W/System.err: at com.nextcloud.talk.controllers.ChatController.access$processMessagesResponse(ChatController.kt:221)
W/System.err: at com.nextcloud.talk.controllers.ChatController$pullChatMessages$2.onNext(ChatController.kt:2309)
W/System.err: at com.nextcloud.talk.controllers.ChatController$pullChatMessages$2.onNext(ChatController.kt:2294)
W/System.err: at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:201)
W/System.err: at io.reactivex.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:255)
W/System.err: at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:124)
W/System.err: at android.os.Handler.handleCallback(Handler.java:883)
W/System.err: at android.os.Handler.dispatchMessage(Handler.java:100)
W/System.err: at android.os.Looper.loop(Looper.java:224)
W/System.err: at android.app.ActivityThread.main(ActivityThread.java:7590)
W/System.err: at java.lang.reflect.Method.invoke(Native Method)
W/System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)
Known issues:
- doesn't respect handling for other instances. E.g. when receiving notification from other instance and open it.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Fix to always allow opening same room when being in call
Fix to set also other properties for ApplicationWideCurrentRoomHolder when joining room in chat.
Otherwise it could have been possible to not be allowed to open this chat again from conversation list while being in call.
In a next step, ApplicationWideCurrentRoomHolder should be refactored to hold the conversation itself. Maybe in a map of users to handle different instances.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
more call recording states are:
3 = Starting video recording
4 = Starting audio recording
5 = Recording failed
these actions were added:
- Show grey recording icon to moderators if recording is starting
- Show toast to moderators if recording failed
- Add system message for recording failed
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>