From cc36a18d2c1695f95738ee691abc50e0aecd0849 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 24 May 2022 17:07:58 +0200 Subject: [PATCH] Mute/unmute chat room notifications, using 3-dots menu even for basic chat rooms, updated icons --- CHANGELOG.md | 21 ++++++ app/build.gradle | 2 +- .../chat/fragments/DetailChatRoomFragment.kt | 64 ++++++++++++------ .../main/chat/viewmodels/ChatRoomViewModel.kt | 21 ++++-- .../java/org/linphone/core/CorePreferences.kt | 12 ++++ .../notifications/NotificationsManager.kt | 9 ++- .../drawable-xhdpi/menu_notifications_off.png | Bin 0 -> 1678 bytes .../drawable-xhdpi/menu_notifications_on.png | Bin 0 -> 1363 bytes .../drawable-xhdpi/voip_call_list_menu.png | Bin 750 -> 1895 bytes .../res/drawable-xhdpi/voip_menu_more.png | Bin 1772 -> 1540 bytes .../res/layout/chat_room_detail_fragment.xml | 15 ---- .../main/res/layout/chat_room_list_cell.xml | 43 ++++++++---- app/src/main/res/layout/chat_room_menu.xml | 32 +++++++++ app/src/main/res/values-fr/strings.xml | 3 + app/src/main/res/values/strings.xml | 3 + build.gradle | 2 +- 16 files changed, 171 insertions(+), 56 deletions(-) create mode 100644 app/src/main/res/drawable-xhdpi/menu_notifications_off.png create mode 100644 app/src/main/res/drawable-xhdpi/menu_notifications_on.png diff --git a/CHANGELOG.md b/CHANGELOG.md index 54e3e139c..7127a8aa1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,11 +14,13 @@ Group changes to describe their impact on the project, as follows: ### Added - Conference creation with scheduling, video, different layouts, showing who is speaking and who is muted, etc... +- Chat rooms can be individually muted (no notification when receiving a chat message) ### Changed - In-call views have been re-designed - Improved how call logs are handled to improve performances - Improved how contact avatars are generated +- 3-dots menu even for basic chat rooms ### Fixed - Multiple file download attempt from the same chat bubble at the same time needed app restart to properly download each file @@ -27,6 +29,25 @@ Group changes to describe their impact on the project, as follows: - Show service notification sooner to prevent crash if Core creation takes too long - Trying to keep the preferred driver (OpenSLES / AAudio) when switching device +## [4.6.9] - 2022-05-30 + +### Fixed +- ANR when screen turns OFF/ON while app is in foreground +- Crash due to missing CoreContext instance in TelecomManager service +- One-to-One encrypted chat room creation if it already exists +- Crash if ConnectionService feature isn't supported by the device + +### Changed +- Updated translations from Weblate +- Improved audio devices logs + +## [4.6.8] - 2022-05-23 + +### Fixed +- Crash due to missing CoreContext in CoreService +- Crash in BootReceiver if auto start is disabled +- Other crashes + ## [4.6.7] - 2022-05-04 ### Changed diff --git a/app/build.gradle b/app/build.gradle index a9b27ae9a..4a0a56fff 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -216,7 +216,7 @@ dependencies { implementation "androidx.slidingpanelayout:slidingpanelayout:1.2.0" implementation "androidx.window:window:1.0.0" - implementation 'androidx.constraintlayout:constraintlayout:2.1.3' + implementation 'androidx.constraintlayout:constraintlayout:2.1.4' implementation "androidx.gridlayout:gridlayout:1.0.0" implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0' implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1' diff --git a/app/src/main/java/org/linphone/activities/main/chat/fragments/DetailChatRoomFragment.kt b/app/src/main/java/org/linphone/activities/main/chat/fragments/DetailChatRoomFragment.kt index cb340badc..d0d658ec9 100644 --- a/app/src/main/java/org/linphone/activities/main/chat/fragments/DetailChatRoomFragment.kt +++ b/app/src/main/java/org/linphone/activities/main/chat/fragments/DetailChatRoomFragment.kt @@ -561,10 +561,6 @@ class DetailChatRoomFragment : MasterFragment() + val basicChatRoom: Boolean = chatRoom.hasCapability(ChatRoomCapabilities.Basic.toInt()) + val oneToOneChatRoom: Boolean = chatRoom.hasCapability(ChatRoomCapabilities.OneToOne.toInt()) val encryptedChatRoom: Boolean = chatRoom.hasCapability(ChatRoomCapabilities.Encrypted.toInt()) @@ -99,6 +101,8 @@ class ChatRoomViewModel(val chatRoom: ChatRoom) : ViewModel(), ContactDataInterf val groupCallAvailable: Boolean get() = LinphoneUtils.isRemoteConferencingAvailable() + val notificationsMuted = MutableLiveData() + private var addressToCall: Address? = null private val bounceAnimator: ValueAnimator by lazy { @@ -235,6 +239,8 @@ class ChatRoomViewModel(val chatRoom: ChatRoom) : ViewModel(), ContactDataInterf callInProgress.value = chatRoom.core.callsNb > 0 updateRemotesComposing() + notificationsMuted.value = areNotificationsMuted() + if (corePreferences.enableAnimations) bounceAnimator.start() } @@ -250,10 +256,6 @@ class ChatRoomViewModel(val chatRoom: ChatRoom) : ViewModel(), ContactDataInterf if (corePreferences.enableAnimations) bounceAnimator.end() } - fun hideMenu(): Boolean { - return chatRoom.hasCapability(ChatRoomCapabilities.Basic.toInt()) || (oneToOneChatRoom && !encryptedChatRoom) - } - fun contactLookup() { displayName.value = when { chatRoom.hasCapability(ChatRoomCapabilities.Basic.toInt()) -> LinphoneUtils.getDisplayName( @@ -307,6 +309,17 @@ class ChatRoomViewModel(val chatRoom: ChatRoom) : ViewModel(), ContactDataInterf formatLastMessage(chatRoom.lastMessageInHistory) } + fun areNotificationsMuted(): Boolean { + val id = LinphoneUtils.getChatRoomId(chatRoom.localAddress, chatRoom.peerAddress) + return corePreferences.chatRoomMuted(id) + } + + fun muteNotifications(mute: Boolean) { + val id = LinphoneUtils.getChatRoomId(chatRoom.localAddress, chatRoom.peerAddress) + corePreferences.muteChatRoom(id, mute) + notificationsMuted.value = mute + } + private fun formatLastMessage(msg: ChatMessage?) { val builder = SpannableStringBuilder() if (msg == null) { diff --git a/app/src/main/java/org/linphone/core/CorePreferences.kt b/app/src/main/java/org/linphone/core/CorePreferences.kt index cfdf8bcdc..cdf1b6e8d 100644 --- a/app/src/main/java/org/linphone/core/CorePreferences.kt +++ b/app/src/main/java/org/linphone/core/CorePreferences.kt @@ -84,6 +84,18 @@ class CorePreferences constructor(private val context: Context) { // logcatLogsOutput = false } + fun chatRoomMuted(id: String): Boolean { + val sharedPreferences: SharedPreferences = coreContext.context.getSharedPreferences("notifications", Context.MODE_PRIVATE) + return sharedPreferences.getBoolean(id, false) + } + + fun muteChatRoom(id: String, mute: Boolean) { + val sharedPreferences: SharedPreferences = coreContext.context.getSharedPreferences("notifications", Context.MODE_PRIVATE) + val editor = sharedPreferences.edit() + editor.putBoolean(id, mute) + editor.apply() + } + /* App settings */ var debugLogs: Boolean diff --git a/app/src/main/java/org/linphone/notifications/NotificationsManager.kt b/app/src/main/java/org/linphone/notifications/NotificationsManager.kt index 67fd007f2..f60740622 100644 --- a/app/src/main/java/org/linphone/notifications/NotificationsManager.kt +++ b/app/src/main/java/org/linphone/notifications/NotificationsManager.kt @@ -167,7 +167,14 @@ class NotificationsManager(private val context: Context) { ShortcutsHelper.createShortcutsToChatRooms(context) } } - displayIncomingChatNotification(room, message) + + val id = LinphoneUtils.getChatRoomId(room.localAddress, room.peerAddress) + val mute = corePreferences.chatRoomMuted(id) + if (mute) { + Log.i("[Notifications Manager] Chat room $id has been muted") + } else { + displayIncomingChatNotification(room, message) + } } override fun onChatRoomRead(core: Core, chatRoom: ChatRoom) { diff --git a/app/src/main/res/drawable-xhdpi/menu_notifications_off.png b/app/src/main/res/drawable-xhdpi/menu_notifications_off.png new file mode 100644 index 0000000000000000000000000000000000000000..e014eced1f4f5c1fb213e9256c19a0f19b2db3a5 GIT binary patch literal 1678 zcmV;9266d`P)EX>4Tx04R}tkv&MmKpe$iQ;Q-k4i-@n$xxjvh>AFB6^c-y)C#RSm|Xe=O&XFE z7e~Rh;NZt%)xpJCR|i)?5c~jfbaGO3krMxx6k5c1aNLh~_a1le0HI!Hs@X9PsG4P@ z;xRFkT@^cD5x_7)=)-`-OnokyOu%z|-NVP%yC~1{KKJJcDLIn?K9P8q>4rtTK|H-_ z>74h8!>lMN#OK6g23?T&k?XR{Z=4Gb3p_Jyq*L?6VPdh+#&R38qM;H`5l0kNqkJLb zvch?bvs$jQ<~{ifgE?(wnd>x%5XT~xkc0>sRg_SMg($5WDJD|1AM@}JI{qZNWO9|j z$gzM5R7j2={11M2Yvv~>+@xR(2)x+##|Y553p8rB{e5iPjT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FS?VMLrT-6`{J0u=ktvVI%#a$sc+hBp(B~6ZwiTiwGMkA6t8+zxTW2lV;rH z3p^vBBLHTgIN1=akA!?*roe8cW^2p*ZOY}#RJ)SW@MywV+|||`V*n7#wK=CvDJK*F z=G`$P@eTkmAT+l7jws0zq9%XqY7y>-qmorDnwP?15%3@rFyCpg0P|TG)@_)v#RM91 z8mxsbbHc_CPFupIxsP{+y}yI-lY`(N-+#~ZXVO7LwmUXmqU~c20+gBY{X`gWfZJE* zy7B2a&u{d%E`a7f5Xy>#{zYt8wzsxiNX-}kB7rS`XrXlgE*Am41jy4jq2s^+&>8j) zP{ODJ=!*iZdN>ZLiUj?~bA~1WaC?K*LiCzIY5>fc02=|(Q33Di2zYw)j(O=)N^#V3 z%`-HY1AxssT5iUNl~Nl2DdjYU+Z!yknU_H8d&hQr$SN_<>{gpc3I^BK9yCf9|5``D zs{pN;7|j9L0(?(`y`?4AzD)L>1a>!vmy4nI3-C~$tNxh`-q^m?^GjCno4!B|gANpw zS0ojK;Dwu^e;nBD39ZyDJpg7ExnHBA>G6)Rw?E~1ZubWzn&q=;KmlMTv3#PGGE-pt zu2=(rMGl;@`>(~#`V^Qz4bH`nB#Rnb!pmUm6OKBEU@4PrFLylrldNC}m1j)=i_a@6 zSd&QMj-JC5M8XU>o>xF5$|N-C_{}CXNC42_3!Np%Vu!G2B0=v1oIK1rQsCxHaa|@^ z3;=V@cqf2!4qW1A=bG^k$9>b_3#=ee?{qF9t*N>*>>U^v{yT#HL4wo*h!p{iiKgdn zLMP=F?Lq%nHssL)lf*$7yrv`U{W^V+Cw{dn=s!{FvK|)5%YbwPurtph``21{Swos|rw0<-mhPklPbpA*`3BN(z!FX+F6#>=~S@`TsBTGut8X%jPKn O0000 - @@ -131,7 +128,6 @@ - - @@ -131,24 +130,42 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/title" - android:layout_toLeftOf="@id/ephemeral" + android:layout_toLeftOf="@id/icons" android:ellipsize="end" android:maxLines="2" - android:text="@{viewModel.lastMessageText}" /> + android:text="@{viewModel.lastMessageText, default=`Lorem ipsum dolor sit amet`}" /> - + android:gravity="right"> + + + + + + diff --git a/app/src/main/res/layout/chat_room_menu.xml b/app/src/main/res/layout/chat_room_menu.xml index a5d1d778d..6c7550a2a 100644 --- a/app/src/main/res/layout/chat_room_menu.xml +++ b/app/src/main/res/layout/chat_room_menu.xml @@ -16,6 +16,12 @@ + + @@ -25,6 +31,12 @@ + + + + + + Appel de groupe Voulez-vous démarrer un appel de groupe ?\nToutes les personnes dans cette conversation vont recevoir un appel. Démarrer + Désactiver les notifications + Activer les notifications + Les notifications sont désactivées pour cette conversation \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8fea766ed..34da62b26 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -190,6 +190,8 @@ Conversation\'s devices Ephemeral messages Delete messages + Disable notifications + Enable notifications Ephemeral messages This message will be deleted on both ends once it has been read and after the selected timeout. Disabled @@ -773,6 +775,7 @@ Contact is an admin in this conversation Contact isn\'t an admin in this conversation Messages are ephemeral in this conversation + Notifications are disabled for this conversation Contact can be invited in encrypted conversations Go into conversation Go into encrypted conversation diff --git a/build.gradle b/build.gradle index bf3a0c8ea..83d1f7501 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ buildscript { } // for com.github.chrisbanes:PhotoView } dependencies { - classpath 'com.android.tools.build:gradle:7.2.0' + classpath 'com.android.tools.build:gradle:7.2.1' classpath 'com.google.gms:google-services:4.3.10' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21" classpath "org.jlleitschuh.gradle:ktlint-gradle:10.1.0"