Commit graph

3252 commits

Author SHA1 Message Date
Marcel Hibbe
d49441e036
get last part after "/" also for content uris
note that this doesn't prevent path traversal as uris can be decoded

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-06-01 10:30:25 +02:00
rapterjet2004
79f317d1e6 issue-3019
Signed-off-by: Julius Linus julius.linus@nextcloud.com
2023-05-26 13:20:22 -05:00
Marcel Hibbe
d127c5401a
fix new onBackPressed handling
this commit fixes bugs from d3056ff2825e53040ca49b86b84f91f73a3eb11c and 1185dcf17a99ca62efd32f8a53c298ec4fd6c4d0

fix onBackPressed handling to use OnBackPressedCallback

remove unnecessary onBackPressedCallback's when they only finished the activity

replaced some finishAffinity methods with finish

...

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-24 15:42:09 +02:00
Ezhil Shanmugham
dff9ea5651
Fixed intendation Signed-off-by: Ezhil Shanmugham ezhil56x.contact@gmail.com
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-24 15:42:09 +02:00
Ezhil Shanmugham
64fa8e830b
Made suggested changes in FullScreenImageActivity.kt, ConversationsListActivity.kt and in some files Signed-off-by: Ezhil Shanmugham ezhil56x.contact@gmail.com
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-24 15:42:09 +02:00
Ezhil Shanmugham
d4a4472968
Removed mistakenly added authorship Signed-off-by: Ezhil Shanmugham ezhil56x.contact@gmail.com
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-24 15:42:09 +02:00
Ezhil Shanmugham
8348792313
Fixed ktlint and detekt errors
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-24 15:42:09 +02:00
Ezhil Shanmugham
7b5caf5007
fixed deprecated onBackPressed Issue-#2961
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-24 15:42:04 +02:00
rapterjet2004
93da3a9c65
Making reply length a const
Signed-off-by: Julius Linus <julius.linus@nextcloud.com>

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-24 10:40:28 +02:00
rapterjet2004
a926c27ae7
working on issue 3026
Signed-off-by: Julius Linus <julius.linus@nextcloud.com>

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-24 10:40:28 +02:00
Andy Scherzinger
984c8bff5c
further improve formatting
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-24 10:19:36 +02:00
Andy Scherzinger
c6e082c6b1
Replace any magic numbers detekt-ed
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-24 09:47:27 +02:00
Andy Scherzinger
f7e5881d87
Fix any detekt formatting issues
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-24 09:38:56 +02:00
Andy Scherzinger
5ec013143f
Migrate theme API calls - away from deprecated ones
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-24 09:08:18 +02:00
Julius Linus
528f1fd431
Merge branch 'master' into translate-message-mvvm-impl
Signed-off-by: Julius Linus <69230048+rapterjet2004@users.noreply.github.com>
2023-05-23 08:07:40 -05:00
Marcel Hibbe
0eac3a2d11
fix codacy warning
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-23 12:10:18 +02:00
Marcel Hibbe
9a76ce7ccd
fix to close gap between typing indicator and message input
otherwise chat content was visible in between

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-23 12:06:02 +02:00
Marcel Hibbe
5a97e90a82
improve detekt score: avoid magicNumbers...
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-23 11:34:38 +02:00
Marcel Hibbe
61859f361a
convert ConversationMessageNotifier to kt
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-23 11:16:47 +02:00
Marcel Hibbe
68799cfa24
avoid lint warning
..."Resource IDs will be non-final by default in Android Gradle Plugin version 8.0, avoid using them as annotation attributes" by using @KeyByString

keys were also wrong by copy&paste and are now fixed

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-23 10:49:31 +02:00
Marcel Hibbe
f0a9a302bb
make typing indicator two lines if necessary
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-23 10:49:31 +02:00
Marcel Hibbe
7b12f27a1a
move typing indicator methods
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-23 10:49:31 +02:00
Marcel Hibbe
fa4d02e2c6
send stoppedTyping signaling message when sending chat message
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-23 10:49:31 +02:00
Marcel Hibbe
add5e518e1
use height from typingIndicator layout
no need to define it redundant...

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-23 10:49:30 +02:00
Marcel Hibbe
231cfef8c3
check capabilities to use/ignore typing indicators
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-23 10:49:30 +02:00
Marcel Hibbe
d3d8e2abef
add setting to toggle typing status privacy
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-23 10:49:30 +02:00
Marcel Hibbe
0d6e971c38
fix to use newest capabilities to update settings.
Without this refreshing of capabilites, depending settings (for now read privacy) were never updated until app was started again because the user still contained old capabilities.

This fix will also be necessary for the typing indicator setting.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-23 10:49:30 +02:00
Marcel Hibbe
ecec266765
improve typing indicator design
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-23 10:49:30 +02:00
Marcel Hibbe
6adca2395d
add handling for multiple typing participants
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-23 10:49:29 +02:00
Marcel Hibbe
85f637ca8a
WIP. update UI when typing message received
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-23 10:49:29 +02:00
Marcel Hibbe
50e7af4d04
add timer for typing logic
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-23 10:49:29 +02:00
Marcel Hibbe
16d2d3d693
add timer for typing logic
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-23 10:49:29 +02:00
Marcel Hibbe
6228ec8d75
add sending of "typing" signaling messages
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-23 10:49:28 +02:00
Marcel Hibbe
8997c3b5c7
add receiving of "typing" signaling messages
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-23 10:49:28 +02:00
Marcel Hibbe
05b57dc4c7
rename controller_chat.xml to activity_chat.xml
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-23 10:49:28 +02:00
Julius Linus
480ad8941b
Update TranslateViewModel.kt
codacy error dix

Signed-off-by: Julius Linus <69230048+rapterjet2004@users.noreply.github.com>
2023-05-22 13:12:36 -05:00
rapterjet2004
5a18a05654 fixing detekt errors :|
Signed-off-by: Julius Linus <julius.linus@nextcloud.com>
2023-05-22 11:47:14 -05:00
rapterjet2004
00f86144d8 rewriting translate feature to use MVVM
Signed-off-by: Julius Linus <julius.linus@nextcloud.com>
2023-05-22 11:18:21 -05:00
rapterjet2004
c62a904c82 WIP rewriting translate feature to use MVVM
Signed-off-by: Julius Linus <julius.linus@nextcloud.com>
2023-05-19 17:12:37 -05:00
Andy Scherzinger
8a8f6d4e71
Add copy to clipboard action and fix layout issues for landscape mode while loading
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-17 23:31:00 +02:00
Andy Scherzinger
f9e1b40a0d
improve code formatting
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-17 23:10:07 +02:00
rapterjet2004
7f33b7fdfd issue 2931 - follow up fixes
Signed-off-by: Julius Linus <juliuslinus1@gmail.com>
2023-05-17 15:43:08 -05:00
Andy Scherzinger
b779a01c27
extract URL creation and shift paramters to retrofit API
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-17 18:59:04 +02:00
Andy Scherzinger
325be4b9f6
Optimze translation layout with specific landscape layout and use of autocomplete fields instead of spinner
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-17 15:39:46 +02:00
Andy Scherzinger
cff28de8b1
hide translation option of no target languages available
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-17 13:17:34 +02:00
Andy Scherzinger
e4f94dbcfd
Only show translation menu item for text messages
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-17 12:16:33 +02:00
Andy Scherzinger
6adf741dc1
Fix detekt issues
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-17 12:11:01 +02:00
Andy Scherzinger
f1805c9ddd
convert further strings to be translatable and unify logging tag
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-17 11:29:55 +02:00
Andy Scherzinger
98690a02d1
Makes dialog strings translatable and move to themed Material dialog
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-17 11:12:15 +02:00
Andy Scherzinger
ac0f8608a7
Add licence headers and optimize/theme translation layout
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-17 10:53:52 +02:00
rapterjet2004
5bc0f82398
issue 2931 progress - final push I hope
Signed-off-by: Julius Linus <juliuslinus1@gmail.com>

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-17 10:53:52 +02:00
rapterjet2004
0f8aa7f9e6
issue 2931 progress - pretty much done with the functionality, just got a couple small adjustments
Signed-off-by: Julius Linus <juliuslinus1@gmail.com>

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-17 10:53:52 +02:00
rapterjet2004
c6eacd30ea
issue 2931 progress - finally got most functionality + looks decent
Signed-off-by: Julius Linus <juliuslinus1@gmail.com>

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-17 10:53:52 +02:00
rapterjet2004
b91e17ca3d
issue 2931 progress
Signed-off-by: Julius Linus <juliuslinus1@gmail.com>

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-17 10:53:52 +02:00
rapterjet2004
9e9c6e81b9
issue 2931 progress
Signed-off-by: Julius Linus <juliuslinus1@gmail.com>

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-17 10:53:52 +02:00
rapterjet2004
0168be395a
issue 2931 progress
Signed-off-by: Julius Linus <juliuslinus1@gmail.com>

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-17 10:53:52 +02:00
rapterjet2004
8cdd8e9d8f
issue 2931 progress
Signed-off-by: Julius Linus <juliuslinus1@gmail.com>

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-17 10:53:52 +02:00
Marcel Hibbe
6be93ad2cd
fix to keep entered text when app is in background
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-12 15:54:57 +02:00
Marcel Hibbe
998f6c11d9
fix conversation avatars for NC26
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-05 15:08:31 +02:00
Marcel Hibbe
cafb8b649a
send call reactions
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-04 16:49:47 +02:00
Marcel Hibbe
6d735dd537
show call reactions from other participants
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-04 16:49:46 +02:00
Marcel Hibbe
c379630610
add animated emoji reactions to calls (no signaling yet)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-04 16:49:46 +02:00
Andy Scherzinger
2ce57f4956
Merge pull request #2997 from nextcloud/feature/noid/emojiAvatars
hide delete button if no custom avatar is set
2023-05-04 16:39:11 +02:00
Daniel Calviño Sánchez
efab4cb664
Handle raised hands from the call participants rather than the signaling
Although listening from the signaling was working fine and this
unfortunately adds a lot of extra code it is conceptually "more
correct", as the UI should not directly deal with the signaling if there
is a higher abstraction available. Nevertheless, this should ease adding
other similar changes, like reactions.

Note that although there were already listeners for
CallParticipantModel.Observer in the CallActivity they were not reused,
as they handle totally unrelated things.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2023-05-04 15:15:36 +02:00
Daniel Calviño Sánchez
92d655080d
Add "reaction" event to CallParticipantModel observer
The CallParticipantModel observer now also emits one-time events that
are not reflected in the model state.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2023-05-04 15:15:36 +02:00
Daniel Calviño Sánchez
0a54fd6127
Add listener for "reaction" signaling message
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2023-05-04 15:15:35 +02:00
Marcel Hibbe
579b3b5ab4
handle emoji avatars
hide delete option from conversation info edit view if no custom avatar is set

remove themed avatars (This is the price of being able to have emoji avatars)

fix dark mode url

remove avatarVersion from url if it's null

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-04 14:43:29 +02:00
Marcel Hibbe
7518fdbcd9
fix screen locking feature
Since most controllers were replaced by activities, the screen locking was temporarily broken. This commit fixes the screen locking to also work with the activities.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-04 10:33:11 +02:00
Marcel Hibbe
b2e75a070c
remove userManager!!.users.subscribe for "share to"
i don't know why this was necessary in the past (inside the MainActivity). It works without as well.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 19:17:32 +02:00
Marcel Hibbe
6c2c15cd89
fix shareTo feature
it was broken since ConversationsList was migrated to Activity

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 19:17:32 +02:00
Andy Scherzinger
248aa69be7
Reformat java code
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-05-01 17:04:31 +02:00
Marcel Hibbe
1301d627dd
remove conversation avatar from chatActivity.
only show users avatars.
conversation avatars were removed again for now, because this would need more work to add custom view to the supportActionBar in order to show themed drawables.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:28 +02:00
Marcel Hibbe
28046c2492
WIP. add themed placeholders for conversationAvatars
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:28 +02:00
Marcel Hibbe
050f0f4422
fix to show placeholder avatar when none is set by user
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:27 +02:00
Marcel Hibbe
898728cef9
use cache for user avatars again (ignore flickering)
in the future, avatarVersion might be available for user avatars as well..

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-05-01 12:25:27 +02:00
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
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
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
Marcel Hibbe
e362e8e3d0
Handle new capabilities json structure
Because of "supported-reactions" and "predefined-backgrounds" the capabilities cannot be parsed with
`var config: HashMap<String, HashMap<String, String>>?`

As a result it was not possible to login into the app.

This is now
`var config: HashMap<String, HashMap<String, @RawValue @Contextual Any>>?` while always checking for the type when accessing the values.

"supported-reactions" and "predefined-backgrounds" are not handled yet.
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-04-21 17:29:53 +02:00
Marcel Hibbe
ae9e9924e6
Fix to open conversation list when navigating back after chat was opened by notification
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-04-21 13:30:25 +02:00
Andy Scherzinger
12a9f9b159
add support for group mentions
Resolves #2860

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-04-19 12:05:54 +02:00
Andy Scherzinger
cd38c8dbb6
lint: move from resource IDs to fixed, unique Int values for view types
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-04-14 22:07:00 +02:00
Andy Scherzinger
f52fd59125
move array to list
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-04-14 20:04:22 +02:00
Andy Scherzinger
584947c8e3
Improve theming for toolbars
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-04-09 21:38:05 +02:00
Marcel Hibbe
28a235ae45
Add todos
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-04-09 12:16:49 +02:00
Marcel Hibbe
9c9259b730
Add temporary workarounds until conductor is removed
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-04-09 12:16:49 +02:00
Marcel Hibbe
1246223859
Fix to add account (temp solution until conductor is removed)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-04-09 12:16:49 +02:00
Marcel Hibbe
aa1e93db05
WIP. Replace Controller with Activity for ConversationList
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-04-09 12:16:49 +02:00
Marcel Hibbe
c34e656eca
Fix to scroll to first unread message
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-04-05 17:01:26 +02:00
Marcel Hibbe
48a4fbc3cc
Reimplement breakout rooms for usage of Activity instead of Controller
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-04-05 12:52:42 +02:00
Marcel Hibbe
68b930a0d9
remove ConductorRemapping.kt
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-04-05 12:52:42 +02:00
Marcel Hibbe
f9836da4a8
fix to start voice message playback only when activity is visible
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-04-05 12:52:42 +02:00
Marcel Hibbe
f7529446a4
remove unused item from onOptionsItemSelected
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-04-05 12:52:41 +02:00
Marcel Hibbe
9e66c3192c
fix to open chat via bottom menu
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-04-05 12:52:41 +02:00
Marcel Hibbe
708beabe9d
setup adapter in onCreate + extract some functions from onResume
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-04-05 12:52:41 +02:00
Marcel Hibbe
0b0387115e
fix to open poll dialog
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-04-05 12:52:40 +02:00
Marcel Hibbe
52266a5632
fix NPE when quoted message is expired or deleted
for now the message is shown empty. should be improved!

D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.nextcloud.talk2, PID: 29567
    java.lang.NullPointerException
        at com.nextcloud.talk.models.json.chat.ChatMessage.getText(ChatMessage.kt:264)
        at com.nextcloud.talk.adapters.messages.OutcomingTextMessageViewHolder.processParentMessage(OutcomingTextMessageViewHolder.kt:168)
        at com.nextcloud.talk.adapters.messages.OutcomingTextMessageViewHolder.onBind(OutcomingTextMessageViewHolder.kt:100)
        at com.nextcloud.talk.adapters.messages.OutcomingTextMessageViewHolder.onBind(OutcomingTextMessageViewHolder.kt:54)
        at com.stfalcon.chatkit.messages.MessageHolders.bind(MessageHolders.java:596)
        at com.stfalcon.chatkit.messages.MessagesListAdapter.onBindViewHolder(MessagesListAdapter.java:110)
        at com.nextcloud.talk.adapters.messages.TalkMessagesListAdapter.onBindViewHolder(TalkMessagesListAdapter.java:50)
        at com.nextcloud.talk.adapters.messages.TalkMessagesListAdapter.onBindViewHolder(TalkMessagesListAdapter.java:32)
        at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:7678)
        at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:7761)
        at androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:6582)
        at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6848)
        at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6688)
        at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6684)
        at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2362)
        at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1662)
        at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1622)
        at androidx.recyclerview.widget.LinearLayoutManager.scrollBy(LinearLayoutManager.java:1425)
        at androidx.recyclerview.widget.LinearLayoutManager.scrollVerticallyBy(LinearLayoutManager.java:1158)
        at androidx.recyclerview.widget.RecyclerView.scrollStep(RecyclerView.java:2009)
        at androidx.recyclerview.widget.RecyclerView$ViewFlinger.run(RecyclerView.java:5789)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1301)
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1309)
        at android.view.Choreographer.doCallbacks(Choreographer.java:923)
        at android.view.Choreographer.doFrame(Choreographer.java:847)
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1283)
        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:8741)
        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-04-05 12:52:40 +02:00
Marcel Hibbe
906c1f7529
fix to show avatar, fix onClick listener
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-04-05 12:52:40 +02:00
Marcel Hibbe
5fc69201fe
fix to open Conversation List for onBackPressed when switched chats
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-04-05 12:52:40 +02:00
Marcel Hibbe
63b2455745
remove KEY_OPEN_CHAT
this was temporarily used until now Chat is an Activity

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-04-05 12:52:40 +02:00
Marcel Hibbe
d42783273d
leave room before joining another room
refactor retrieving of extras

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-04-05 12:52:39 +02:00
Marcel Hibbe
cd2ef40dc8
Replace Controller with Activity for chat
chat opens, but quite some todos open. expect crashes.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-04-05 12:52:39 +02:00
Marcel Hibbe
e740797b42
Fix to open chat from ContactsActivity.kt
(temporarily via MainActivity and ConductorRemapping until conductor is removed)

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-31 12:38:32 +02:00
Marcel Hibbe
5aac5637a7
Fix to add participant to conversation
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-31 12:38:32 +02:00
Marcel Hibbe
8361a97ee9
Fix fluent scrolling in participants list
fix #1833

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-31 12:38:32 +02:00
Marcel Hibbe
e359db66ec
ReplaceController with Activity for Contacts
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-31 12:38:31 +02:00
Marcel Hibbe
85dd7c3996
ReplaceController with Activity for ConversationInfo
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-31 12:38:31 +02:00
Marcel Hibbe
5e0e4ee54f
Fix to open profile view
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-30 10:37:43 +02:00
Marcel Hibbe
fdf76e260b
Remove reauthorize setting
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-30 10:34:07 +02:00
Marcel Hibbe
b5febb7e3d
Replace Controller with Activity for settings
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-30 10:33:35 +02:00
Marcel Hibbe
bde67eb2bd
Replace Controller with Activity for profile
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-30 10:25:12 +02:00
Marcel Hibbe
bc96ffcd20
Fix to forget geocoding result when scrolled and then rotated device
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-29 12:39:05 +02:00
Marcel Hibbe
4ab3d78458
Keep position on screen rotation
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-29 12:39:05 +02:00
Marcel Hibbe
f323049815
Fix to keep map position when app was in background
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-29 12:39:05 +02:00
Marcel Hibbe
95afdf7c81
Remove geocoding activity from history by FLAG_ACTIVITY_CLEAR_TOP
With this, it's not opened again with onBackPressed in location view. But it still opens again when app was interrupted and being shown again.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-29 12:39:05 +02:00
Marcel Hibbe
1676c9f6da
Replace Controllers with Activities for location+geocoding
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-29 12:39:05 +02:00
Andy Scherzinger
3d4edb6c9c
Add SDK=33 permission checks for file access
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-03-24 15:42:22 +01:00
Andy Scherzinger
737ce20927
Bump target and compile SDK to 33
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-03-24 15:42:22 +01:00
Marcel Hibbe
73d3ecac0e
Set minSdkVersion to 24 + remove checks
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-03-23 15:41:39 +01:00