Commit graph

6729 commits

Author SHA1 Message Date
Marcel Hibbe
d560a4a2a9
use avatar version of conversations to avoid unnecessary reloading/flickering
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:27 +02:00
Marcel Hibbe
0b5f38f232
use icons for profile edit appbar
to use same design as for conversation info editing

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:26 +02:00
Marcel Hibbe
260452234b
rename packages, add license comments
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:26 +02:00
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
Andy Scherzinger
bd9a32a684
Merge pull request #2981 from nextcloud/dependabot/gradle/net.zetetic-android-database-sqlcipher-4.5.4
Build(deps): Bump net.zetetic:android-database-sqlcipher from 4.5.3 to 4.5.4
2023-04-28 16:52:15 +02:00
Andy Scherzinger
2bac53c4f7
Merge pull request #2980 from nextcloud/chore/2972/weRTCViaJitpackFinal
Remove remaining webrtc download implementation
2023-04-28 16:51:25 +02:00
Andy Scherzinger
bf0b2058fb
Merge pull request #2982 from nextcloud/repo-sync/android-config/master
🔄 synced file(s) with nextcloud/android-config
2023-04-28 06:47:03 +02:00
Nextcloud bot
6d8b7e2191
Fix(l10n): Update translations from Transifex
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-04-28 04:36:30 +00:00
Nextcloud bot
e8a37094d8
Fix(l10n): Update Transifex configuration
Signed-off-by: Nextcloud bot <bot@nextcloud.com>
2023-04-28 04:36:12 +00:00
nextcloud-android-bot
617fed6dee 🔄 synced local '.github/workflows/' with remote 'config/workflows/'
Signed-off-by: nextcloud-android-bot <android@nextcloud.com>
2023-04-28 02:32:02 +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
Andy Scherzinger
16dc7cee47
remove remaining webrtc download implementation
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-04-27 17:41:04 +02: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
7ed1c95cb8
Merge pull request #2976 from nextcloud/bugfix/noid/fixCapabilityParsing
Fix call feature parsing
2023-04-26 13:19:26 +02:00