Commit graph

5444 commits

Author SHA1 Message Date
Marcel Hibbe
9ced54986d
only reload 1:1 conversation avatars in conversation list on initial loading, else use from cache
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:26 +02:00
Marcel Hibbe
c641d51eec
use dark avatars for dark mode in ChatActivity
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:26 +02:00
Marcel Hibbe
e2c7d570fc
avoid UninitializedPropertyAccessException for optionsMenu
otherwise:

E  FATAL EXCEPTION: main
    Process: com.nextcloud.talk2, PID: 13169
    io.reactivex.exceptions.UndeliverableException: The exception could not be delivered to the consumer because it has already canceled/disposed the flow or the exception has nowhere to go to begin with. Further reading: https://github.com/ReactiveX/RxJava/wiki/What's-different-in-2.0#error-handling | kotlin.UninitializedPropertyAccessException: lateinit property optionsMenu has not been initialized
    	at io.reactivex.plugins.RxJavaPlugins.onError(RxJavaPlugins.java:367)
    	at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:126)
    	at android.os.Handler.handleCallback(Handler.java:942)
    	at android.os.Handler.dispatchMessage(Handler.java:99)
    	at android.os.Looper.loopOnce(Looper.java:226)
    	at android.os.Looper.loop(Looper.java:313)
    	at android.app.ActivityThread.main(ActivityThread.java:8757)
    	at java.lang.reflect.Method.invoke(Native Method)
    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
    Caused by: kotlin.UninitializedPropertyAccessException: lateinit property optionsMenu has not been initialized
    	at com.nextcloud.talk.conversation.info.ConversationInfoActivity.showOptionsMenu(ConversationInfoActivity.kt:214)
    	at com.nextcloud.talk.conversation.info.ConversationInfoActivity$fetchRoomInfo$1.onNext(ConversationInfoActivity.kt:670)
    	at com.nextcloud.talk.conversation.info.ConversationInfoActivity$fetchRoomInfo$1.onNext(ConversationInfoActivity.kt:652)
    	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:226) 
    	at android.os.Looper.loop(Looper.java:313) 
    	at android.app.ActivityThread.main(ActivityThread.java:8757) 
    	at java.lang.reflect.Method.invoke(Native Method) 
    	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) 
    	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067) 

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:25 +02:00
Marcel Hibbe
effbd28f5d
remove placeholder for loadAvatarInternal
this looks smoother when loading the avatars (less flickering)
"error" and "fallback" take over if something goes wrong.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:25 +02:00
Marcel Hibbe
6b98a19294
change CachePolicy for replace to WRITE_ONLY
this seems to avoid that on a second load without to use replace, an old image from cache is loaded

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:25 +02:00
Marcel Hibbe
dcb22c8909
use icons for conversation appbar edit view
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:25 +02:00
Marcel Hibbe
e9a9d85148
remove unused resource
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:24 +02:00
Marcel Hibbe
b4256e57c9
only reload avatars in conversation list on initial loading, else use from cache
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:24 +02:00
Marcel Hibbe
2ecea9e569
ignore cache when replacing image
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:24 +02:00
Marcel Hibbe
c880378ac0
fix to always load newest avatar image for chat (disable cache)
also disable placeholder (otherwise it's flickering on every load)

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:23 +02:00
Marcel Hibbe
076b9b2aef
pass "replace" as parameter to load*Avatar methods
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:23 +02:00
Marcel Hibbe
5a56d8c614
Fix to not load user avatar for conversation
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:23 +02:00
Marcel Hibbe
dd4b797ef8
show conversation avatars in chat appbar
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:23 +02:00
Marcel Hibbe
6152fa50fe
Add editing of conversation name and description
Improvements to be done:
MVVM
emoji picker
horizontal design

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:23 +02:00
Marcel Hibbe
b43a31a4ca
Restrict edit conversation view to admins
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:22 +02:00
Marcel Hibbe
1368f70d1f
Add system messages for avatar set/removed
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:22 +02:00
Marcel Hibbe
3dc3bf0cf8
WIP: add new screen for conversation info editing
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:22 +02:00
Marcel Hibbe
84008a40dc
add editing mode for conversation avatar
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:22 +02:00
Marcel Hibbe
dc09f21870
add capability check for conversation avatar
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:21 +02:00
Marcel Hibbe
5870a30410
fix avatar buttons color
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:21 +02:00
Marcel Hibbe
797c062981
refactor (move methods)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:21 +02:00
Marcel Hibbe
d6cec7f6b7
Add fun to delete conversation avatar
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:21 +02:00
Marcel Hibbe
0063fa8c10
Fix key name to upload conversation avatars
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:20 +02:00
Marcel Hibbe
fdb845d298
WIP: Add conversation avatar options in conversation info
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:20 +02:00
Marcel Hibbe
87c53979c4
Use avatars from server (depending on light/dark mode)
Placeholder avatars now also come from the server. This means themed avatars from the android app itself are no longer used here. The static placeholder icons defined in loadConversationAvatar are only used when the http request fails completely.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:20 +02:00
Marcel Hibbe
ed4fa3690d
Use avatars from server (depending on light/dark mode)
Placeholder avatars now also come from the server. This means themed avatars from the android app itself are no longer used here. The static placeholder icons defined in loadConversationAvatar are only used when the http request fails completely.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:20 +02:00
Marcel Hibbe
ad15bca8ec
WIP: use placeholders when avatar is not available
Problem:
i want to load avatars and if no avatar is received, i want to show the placeholder.
However with coil it's not possible to make the placeholders rounded. See https://github.com/coil-kt/coil/issues/37

I could just set the old rounded drawables that we have, but then theming wouldn't work!

So i ask myself what the best solution could be:

- Somehow check beforehand if an avatar is set at all? and then choose between loading the avatar or loading the the static drawables in their own loading request.

- Somehow check if the avatar response is empty. And if yes, make another request to load the static drawables.

- Use jetpack compose instead of coil to clip the image? See https://stackoverflow.com/questions/66014834/how-to-draw-a-circular-image-in-android-jetpack-compose

- create new svg's? Somehow it should be possible to invert a circle and just overlay it over an image..?

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:19 +02:00
Marcel Hibbe
c3b468118a
WIP: show conversation avatar
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:19 +02:00
Marcel Hibbe
60534aca61
change image picker code for activity instead controller
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:19 +02:00
Tim Krüger
f44c528b4f
Move image picker logic to new class 'PickImage'
This is a preparation to solve issue #2555 and centralize the image picker
functionality.

See: #2555

Signed-off-by: Tim Krüger <t@timkrueger.me>
2023-05-01 12:25:19 +02:00
Nextcloud bot
c9739e69af
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-05-01 04:40:19 +00:00
Nextcloud bot
a68569bf8b
Fix(l10n): Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-05-01 04:40:00 +00:00
Nextcloud bot
1e67ec8656
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-04-30 04:37:00 +00:00
Nextcloud bot
f5fe00845d
Fix(l10n): Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-04-30 04:36:40 +00:00
Nextcloud bot
0a7cffee68
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-04-29 04:36:28 +00:00
Nextcloud bot
51ff21cf6e
Fix(l10n): Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-04-29 04:36:09 +00:00
dependabot[bot]
631b7eb536
Build(deps): Bump net.zetetic:android-database-sqlcipher
Bumps [net.zetetic:android-database-sqlcipher](https://github.com/sqlcipher/android-database-sqlcipher) from 4.5.3 to 4.5.4.
- [Release notes](https://github.com/sqlcipher/android-database-sqlcipher/releases)
- [Commits](https://github.com/sqlcipher/android-database-sqlcipher/compare/v4.5.3...v4.5.4)

---
updated-dependencies:
- dependency-name: net.zetetic:android-database-sqlcipher
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-04-28 01:57:35 +00:00
Nextcloud bot
4d9cb24b63
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-04-27 04:42:05 +00:00
Nextcloud bot
031c9c9d45
Fix(l10n): Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-04-27 04:41:46 +00:00
Marcel Hibbe
eab052d2ac
Delete unused methods
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-04-26 09:53:19 +02:00
Marcel Hibbe
1e87fe9b69
Fix wrong parsing of capability values
This fixes bugs that were introduced with https://github.com/nextcloud/talk-android/pull/2963

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-04-26 09:53:19 +02:00
Andy Scherzinger
30e4698c1a
Parse value as String which should work for old values (Strings) and new Values (Boolean)
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-04-26 09:53:18 +02:00
Andy Scherzinger
6172b62f3f
Switch webRTC dependency to gradle dependency managed via jitpack publishings
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-04-26 09:02:36 +02:00
Nextcloud bot
f72d6032ff
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-04-26 04:42:55 +00:00
Nextcloud bot
0575be71aa
Fix(l10n): Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-04-26 04:42:34 +00:00
Nextcloud bot
366e57afbe
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-04-25 04:32:23 +00:00
Nextcloud bot
383420f3c5
Fix(l10n): Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-04-25 04:32:04 +00:00
Andy Scherzinger
cce57ebfb4
Merge pull request #2969 from nextcloud/dependabot/gradle/org.mockito-mockito-core-5.3.1
Build(deps): Bump org.mockito:mockito-core from 5.3.0 to 5.3.1
2023-04-24 12:20:56 +02:00
Andy Scherzinger
db4a19398d
Merge pull request #2968 from nextcloud/dependabot/gradle/okhttpVersion-4.11.0
Build(deps): Bump okhttpVersion from 4.10.0 to 4.11.0
2023-04-24 12:20:21 +02:00
Nextcloud bot
c2e5524600
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-04-24 04:44:58 +00:00