diff --git a/library/ui-strings/src/main/res/values-ca/strings.xml b/library/ui-strings/src/main/res/values-ca/strings.xml
index 863fa13fbb..daeebf6b30 100644
--- a/library/ui-strings/src/main/res/values-ca/strings.xml
+++ b/library/ui-strings/src/main/res/values-ca/strings.xml
@@ -2604,7 +2604,7 @@
Explora sales
Per estar més segur, verifica les teves sessions i tanca qualsevol sessió que no reconeguis o ja no utilitzis.
Altres sessions
- Sessions
+ Sessions
Obre la llista d\'espais
Crea un nou xat o sala
Gent
@@ -2674,4 +2674,4 @@
Aquesta sessió està llesta per a missatges segurs.
La teva sessió actual està llesta per a missatges segurs.
Verifica la teva sessió actual obtenir missatges segurs millorats.
-
\ No newline at end of file
+
diff --git a/library/ui-strings/src/main/res/values-cs/strings.xml b/library/ui-strings/src/main/res/values-cs/strings.xml
index 79f8311159..7e6a012c65 100644
--- a/library/ui-strings/src/main/res/values-cs/strings.xml
+++ b/library/ui-strings/src/main/res/values-cs/strings.xml
@@ -2653,7 +2653,7 @@
Zobrazit všechny relace (V2, WIP)
V zájmu co nejlepšího zabezpečení ověřujte své relace a odhlašujte se ze všech relací, které již nepoznáváte nebo nepoužíváte.
Ostatní relace
- Relace
+ Relace
Seznam otevřených prostorů
Vytvořit novou konverzaci nebo místnost
Lidé
diff --git a/library/ui-strings/src/main/res/values-de/strings.xml b/library/ui-strings/src/main/res/values-de/strings.xml
index e01fc898a3..0b6d8b9666 100644
--- a/library/ui-strings/src/main/res/values-de/strings.xml
+++ b/library/ui-strings/src/main/res/values-de/strings.xml
@@ -2589,7 +2589,7 @@
Alle Sitzungen anzeigen (V2, in Arbeit)
Für bestmögliche Sicherheit verifiziere deine Sitzungen und melde dich von allen ab, die du nicht erkennst oder nutzt.
Andere Sitzungen
- Sitzungen
+ Sitzungen
Space-Liste öffnen
Beginne ein Gespräch oder erstelle einen Raum
Favoriten
diff --git a/library/ui-strings/src/main/res/values-et/strings.xml b/library/ui-strings/src/main/res/values-et/strings.xml
index 9bd1dd23b7..51882a505a 100644
--- a/library/ui-strings/src/main/res/values-et/strings.xml
+++ b/library/ui-strings/src/main/res/values-et/strings.xml
@@ -2594,7 +2594,7 @@
Näita kõiki sessioone (V2, WIP)
Parima turvalisuse nimel verifitseeri kõik oma sessioonid ning logi välja neist, mida sa enam ei kasuta.
Muud sessioonid
- Sessionid
+ Sessionid
Ava kogukondade loend
Alusta uut vestlust või loo uus jututuba
Inimesed
diff --git a/library/ui-strings/src/main/res/values-fa/strings.xml b/library/ui-strings/src/main/res/values-fa/strings.xml
index 400a8121f9..1b8d3a4fb3 100644
--- a/library/ui-strings/src/main/res/values-fa/strings.xml
+++ b/library/ui-strings/src/main/res/values-fa/strings.xml
@@ -2603,7 +2603,7 @@
نمایش تمامی نشستها (ن۲، دحت)
برای امنیت بیشتر، نشستهایتان را تأیید و از هر نشستی که تشخیصش نمیدهید یا دیگر استفاده نمیکنید خارج شوید.
دیگر نشستها
- نشستها
+ نشستها
گشودن سیاههٔ فضاها
ایجاد اتاق یا گفتوگویی جدید
افراد
@@ -2700,4 +2700,4 @@
ایجاد پیام خصوصی فقط در نخستین پیام
المنتی ساده شده با زبانههای انتخابی
به کار انداختن چینش جدید
-
\ No newline at end of file
+
diff --git a/library/ui-strings/src/main/res/values-fr/strings.xml b/library/ui-strings/src/main/res/values-fr/strings.xml
index 5a19ccf2da..bbd82dd596 100644
--- a/library/ui-strings/src/main/res/values-fr/strings.xml
+++ b/library/ui-strings/src/main/res/values-fr/strings.xml
@@ -2603,7 +2603,7 @@
Afficher toutes les sessions (V2, en cours)
Pour une meilleure sécurité, vérifiez vos sessions et déconnectez toutes les sessions que vous ne connaissez pas ou que vous n’utilisez plus.
Autres sessions
- Sessions
+ Sessions
Ouvrir la liste des espaces
Créer une nouvelle conversation ou salon
Personnes
diff --git a/library/ui-strings/src/main/res/values-hu/strings.xml b/library/ui-strings/src/main/res/values-hu/strings.xml
index 3068556fe4..397c2d4662 100644
--- a/library/ui-strings/src/main/res/values-hu/strings.xml
+++ b/library/ui-strings/src/main/res/values-hu/strings.xml
@@ -2614,7 +2614,7 @@ A Visszaállítási Kulcsot tartsd biztonságos helyen, mint pl. egy jelszókeze
Minden munkamenet megjelenítése (V2, WIP)
A legjobb biztonság érdekében ellenőrizd a munkameneteket, és jelentkezz ki minden olyan munkamenetből, melyet már nem ismersz fel vagy nem használsz.
Más munkamenetek
- Munkamenetek
+ Munkamenetek
Nyitott területek listája
Új beszélgetés vagy szoba létrehozása
Emberek
diff --git a/library/ui-strings/src/main/res/values-in/strings.xml b/library/ui-strings/src/main/res/values-in/strings.xml
index 3b30950bd1..18dbbff4ad 100644
--- a/library/ui-strings/src/main/res/values-in/strings.xml
+++ b/library/ui-strings/src/main/res/values-in/strings.xml
@@ -2555,7 +2555,7 @@ Di masa mendatang proses verifikasi ini akan dimutakhirkan.
Tampilkan Semua Sesi (V2, Dalam Pengembangan)
Untuk keamanan terbaik, verifikasi sesi Anda dan keluarkan sesi apa pun yang Anda tidak kenal atau Anda tidak gunakan lagi.
Sesi lainnya
- Sesi
+ Sesi
Buka daftar space
Buat percakapan atau ruangan baru
Orang
diff --git a/library/ui-strings/src/main/res/values-it/strings.xml b/library/ui-strings/src/main/res/values-it/strings.xml
index b7b0fe91af..8ad2e62821 100644
--- a/library/ui-strings/src/main/res/values-it/strings.xml
+++ b/library/ui-strings/src/main/res/values-it/strings.xml
@@ -2594,7 +2594,7 @@
Mostra tutte le sessioni (V2, WIP)
Per una maggiore sicurezza, verifica le tue sessioni e disconnetti quelle che non riconosci o che non usi più.
Altre sessioni
- Sessioni
+ Sessioni
Apri elenco spazi
Crea una nuova conversazione o stanza
Persone
diff --git a/library/ui-strings/src/main/res/values-nl/strings.xml b/library/ui-strings/src/main/res/values-nl/strings.xml
index ce122b0646..c5de4ae5f7 100644
--- a/library/ui-strings/src/main/res/values-nl/strings.xml
+++ b/library/ui-strings/src/main/res/values-nl/strings.xml
@@ -2602,7 +2602,7 @@
Open instellingen
Voor de beste beveiliging verifieert u uw sessies en meldt u zich af bij elke sessie die u niet meer herkent of gebruikt.
Andere sessies
- Sessies
+ Sessies
Lijst met publieke spaces
Nieuw gesprek of nieuwe kamer aanmaken
Personen
diff --git a/library/ui-strings/src/main/res/values-pl/strings.xml b/library/ui-strings/src/main/res/values-pl/strings.xml
index b7b73eb9e6..6deb3dd2e7 100644
--- a/library/ui-strings/src/main/res/values-pl/strings.xml
+++ b/library/ui-strings/src/main/res/values-pl/strings.xml
@@ -2699,7 +2699,7 @@
Otwórz ustawienia
Aby zapewnić najlepsze bezpieczeństwo, zweryfikuj swoje sesje i wyloguj się z każdej sesji, której już nie rozpoznajesz lub której już nie używasz.
Inne sesje
- Sesje
+ Sesje
Lista otwartych przestrzeni
Utwórz nową rozmowę lub pokój
Ludzie
diff --git a/library/ui-strings/src/main/res/values-pt-rBR/strings.xml b/library/ui-strings/src/main/res/values-pt-rBR/strings.xml
index 817c7646df..1c5291d6f3 100644
--- a/library/ui-strings/src/main/res/values-pt-rBR/strings.xml
+++ b/library/ui-strings/src/main/res/values-pt-rBR/strings.xml
@@ -2603,7 +2603,7 @@
Mostrar Todas Sessões (V2, WIP)
Para a melhor segurança, verifique suas sessões e faça signout de qualquer sessão que você não reconhece ou usa mais.
Outras sessões
- Sessões
+ Sessões
Abrir lista de espaços
Criar uma nova conversa ou sala
Todas
diff --git a/library/ui-strings/src/main/res/values-ru/strings.xml b/library/ui-strings/src/main/res/values-ru/strings.xml
index 7c9d073035..718e4cd125 100644
--- a/library/ui-strings/src/main/res/values-ru/strings.xml
+++ b/library/ui-strings/src/main/res/values-ru/strings.xml
@@ -2662,7 +2662,7 @@
Все беседы
Для лучшей безопасности заверьте свои сессии и выйдите из тех, которые более не признаёте или не используете.
Другие сессии
- Сессии
+ Сессии
Создать беседу или комнату
Показать все сессии (V2, в разработке)
Люди
diff --git a/library/ui-strings/src/main/res/values-sk/strings.xml b/library/ui-strings/src/main/res/values-sk/strings.xml
index 9eb22e3ae3..b100db2717 100644
--- a/library/ui-strings/src/main/res/values-sk/strings.xml
+++ b/library/ui-strings/src/main/res/values-sk/strings.xml
@@ -2653,7 +2653,7 @@
Zobraziť všetky relácie (V2, WIP)
V záujme čo najlepšieho zabezpečenia overte svoje relácie a odhláste sa z každej relácie, ktorú už nepoznáte alebo nepoužívate.
Iné relácie
- Relácie
+ Relácie
Otvoriť zoznam priestorov
Vytvoriť novú konverzáciu alebo miestnosť
Ľudia
diff --git a/library/ui-strings/src/main/res/values-uk/strings.xml b/library/ui-strings/src/main/res/values-uk/strings.xml
index 3e511f8459..0de8e7191e 100644
--- a/library/ui-strings/src/main/res/values-uk/strings.xml
+++ b/library/ui-strings/src/main/res/values-uk/strings.xml
@@ -2703,7 +2703,7 @@
Показати всі сеанси (V2, WIP)
Для найкращої безпеки перевірте свої сеанси та вийдіть з усіх сеансів, які ви більше не розпізнаєте або не використовуєте.
Інші сеанси
- Сеанси
+ Сеанси
Відкрити список кімнат
Створити нову розмову або кімнату
Люди
diff --git a/library/ui-strings/src/main/res/values-zh-rCN/strings.xml b/library/ui-strings/src/main/res/values-zh-rCN/strings.xml
index db1dab92e2..56a399482c 100644
--- a/library/ui-strings/src/main/res/values-zh-rCN/strings.xml
+++ b/library/ui-strings/src/main/res/values-zh-rCN/strings.xml
@@ -2553,7 +2553,7 @@
显示全部会话(V2, WIP)
为获得最佳安全性,请验证你的会话,并从任何你不认识或不再使用的会话登出。
其他会话
- 会话
+ 会话
打开空间列表
创建新对话或房间
人
diff --git a/library/ui-strings/src/main/res/values-zh-rTW/strings.xml b/library/ui-strings/src/main/res/values-zh-rTW/strings.xml
index 78caa2cc2e..cfeb6ca915 100644
--- a/library/ui-strings/src/main/res/values-zh-rTW/strings.xml
+++ b/library/ui-strings/src/main/res/values-zh-rTW/strings.xml
@@ -2553,7 +2553,7 @@
顯示所有工作階段 (V2, WIP)
為了取得最佳安全性,請驗證您的工作階段並登出任何您無法識別或不再使用的工作階段。
其他工作階段
- 工作階段
+ 工作階段
開啟空間清單
建立新的對話或聊天室
聯絡人
diff --git a/library/ui-strings/src/main/res/values/strings.xml b/library/ui-strings/src/main/res/values/strings.xml
index 2170ec6c5b..40653db278 100644
--- a/library/ui-strings/src/main/res/values/strings.xml
+++ b/library/ui-strings/src/main/res/values/strings.xml
@@ -2365,9 +2365,6 @@
Show All Sessions
Manage Sessions
Sign out of this session
- Sessions
- Other sessions
- For best security, verify your sessions and sign out from any session that you don’t recognize or use anymore.
Server name
Server version
@@ -3229,6 +3226,9 @@
Show All Sessions (V2, WIP)
+ Sessions
+ Other sessions
+ For best security, verify your sessions and sign out from any session that you don’t recognize or use anymore.
Mobile
Web
Desktop
diff --git a/vector/src/main/java/im/vector/app/core/di/MavericksViewModelModule.kt b/vector/src/main/java/im/vector/app/core/di/MavericksViewModelModule.kt
index 62e7140742..7a5b95f88e 100644
--- a/vector/src/main/java/im/vector/app/core/di/MavericksViewModelModule.kt
+++ b/vector/src/main/java/im/vector/app/core/di/MavericksViewModelModule.kt
@@ -90,6 +90,7 @@ import im.vector.app.features.settings.devices.DeviceVerificationInfoBottomSheet
import im.vector.app.features.settings.devices.DevicesViewModel
import im.vector.app.features.settings.devices.v2.details.SessionDetailsViewModel
import im.vector.app.features.settings.devices.v2.othersessions.OtherSessionsViewModel
+import im.vector.app.features.settings.devices.v2.more.SessionLearnMoreViewModel
import im.vector.app.features.settings.devices.v2.overview.SessionOverviewViewModel
import im.vector.app.features.settings.devices.v2.rename.RenameSessionViewModel
import im.vector.app.features.settings.devtools.AccountDataViewModel
@@ -659,4 +660,9 @@ interface MavericksViewModelModule {
@IntoMap
@MavericksViewModelKey(RenameSessionViewModel::class)
fun renameSessionViewModelFactory(factory: RenameSessionViewModel.Factory): MavericksAssistedViewModelFactory<*, *>
+
+ @Binds
+ @IntoMap
+ @MavericksViewModelKey(SessionLearnMoreViewModel::class)
+ fun sessionLearnMoreViewModelFactory(factory: SessionLearnMoreViewModel.Factory): MavericksAssistedViewModelFactory<*, *>
}
diff --git a/vector/src/main/java/im/vector/app/features/settings/devices/v2/VectorSettingsDevicesFragment.kt b/vector/src/main/java/im/vector/app/features/settings/devices/v2/VectorSettingsDevicesFragment.kt
index 1e5c4d88e0..885a91b9d7 100644
--- a/vector/src/main/java/im/vector/app/features/settings/devices/v2/VectorSettingsDevicesFragment.kt
+++ b/vector/src/main/java/im/vector/app/features/settings/devices/v2/VectorSettingsDevicesFragment.kt
@@ -21,7 +21,6 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
-import android.widget.Toast
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.isVisible
import com.airbnb.mvrx.Success
@@ -44,6 +43,7 @@ import im.vector.app.features.settings.devices.v2.list.SESSION_IS_MARKED_AS_INAC
import im.vector.app.features.settings.devices.v2.list.SecurityRecommendationView
import im.vector.app.features.settings.devices.v2.list.SecurityRecommendationViewState
import im.vector.app.features.settings.devices.v2.list.SessionInfoViewState
+import im.vector.app.features.settings.devices.v2.more.SessionLearnMoreBottomSheet
import javax.inject.Inject
/**
@@ -76,7 +76,7 @@ class VectorSettingsDevicesFragment :
private fun initToolbar() {
(activity as? AppCompatActivity)
?.supportActionBar
- ?.setTitle(R.string.settings_sessions_list)
+ ?.setTitle(R.string.device_manager_sessions_list_title)
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
@@ -157,10 +157,22 @@ class VectorSettingsDevicesFragment :
private fun initLearnMoreButtons() {
views.deviceListHeaderOtherSessions.onLearnMoreClickListener = {
- Toast.makeText(context, "Learn more other", Toast.LENGTH_LONG).show()
+ showLearnMoreInfoOtherSessions()
}
}
+ private fun showLearnMoreInfoOtherSessions() {
+ val args = SessionLearnMoreBottomSheet.Args(
+ title = getString(R.string.device_manager_sessions_other_title),
+ description = buildString {
+ append(getString(R.string.device_manager_learn_more_sessions_unverified))
+ append("\n\n")
+ append(getString(R.string.device_manager_learn_more_sessions_inactive))
+ }
+ )
+ SessionLearnMoreBottomSheet.show(childFragmentManager, args)
+ }
+
private fun cleanUpLearnMoreButtonsListeners() {
views.deviceListHeaderOtherSessions.onLearnMoreClickListener = null
}
diff --git a/vector/src/main/java/im/vector/app/features/settings/devices/v2/more/SessionLearnMoreBottomSheet.kt b/vector/src/main/java/im/vector/app/features/settings/devices/v2/more/SessionLearnMoreBottomSheet.kt
new file mode 100644
index 0000000000..5846c8aa0b
--- /dev/null
+++ b/vector/src/main/java/im/vector/app/features/settings/devices/v2/more/SessionLearnMoreBottomSheet.kt
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2022 New Vector Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package im.vector.app.features.settings.devices.v2.more
+
+import android.os.Parcelable
+import android.view.LayoutInflater
+import android.view.ViewGroup
+import androidx.fragment.app.FragmentManager
+import com.airbnb.mvrx.fragmentViewModel
+import com.airbnb.mvrx.withState
+import dagger.hilt.android.AndroidEntryPoint
+import im.vector.app.core.platform.VectorBaseBottomSheetDialogFragment
+import im.vector.app.databinding.BottomSheetSessionLearnMoreBinding
+import kotlinx.parcelize.Parcelize
+
+@AndroidEntryPoint
+class SessionLearnMoreBottomSheet : VectorBaseBottomSheetDialogFragment() {
+
+ @Parcelize
+ data class Args(
+ val title: String,
+ val description: String,
+ ) : Parcelable
+
+ private val viewModel: SessionLearnMoreViewModel by fragmentViewModel()
+
+ override val showExpanded = true
+
+ override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): BottomSheetSessionLearnMoreBinding {
+ return BottomSheetSessionLearnMoreBinding.inflate(inflater, container, false)
+ }
+
+ override fun invalidate() = withState(viewModel) { viewState ->
+ super.invalidate()
+ views.bottomSheetSessionLearnMoreTitle.text = viewState.title
+ views.bottomSheetSessionLearnMoreDescription.text = viewState.description
+ }
+
+ companion object {
+
+ fun show(fragmentManager: FragmentManager, args: Args) {
+ val bottomSheet = SessionLearnMoreBottomSheet()
+ bottomSheet.isCancelable = true
+ bottomSheet.setArguments(args)
+ bottomSheet.show(fragmentManager, "SessionLearnMoreBottomSheet")
+ }
+ }
+}
diff --git a/vector/src/main/java/im/vector/app/features/settings/devices/v2/more/SessionLearnMoreViewModel.kt b/vector/src/main/java/im/vector/app/features/settings/devices/v2/more/SessionLearnMoreViewModel.kt
new file mode 100644
index 0000000000..09ca2df15d
--- /dev/null
+++ b/vector/src/main/java/im/vector/app/features/settings/devices/v2/more/SessionLearnMoreViewModel.kt
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2022 New Vector Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package im.vector.app.features.settings.devices.v2.more
+
+import com.airbnb.mvrx.MavericksViewModelFactory
+import dagger.assisted.Assisted
+import dagger.assisted.AssistedFactory
+import dagger.assisted.AssistedInject
+import im.vector.app.core.di.MavericksAssistedViewModelFactory
+import im.vector.app.core.di.hiltMavericksViewModelFactory
+import im.vector.app.core.platform.EmptyAction
+import im.vector.app.core.platform.EmptyViewEvents
+import im.vector.app.core.platform.VectorViewModel
+
+class SessionLearnMoreViewModel @AssistedInject constructor(
+ @Assisted initialState: SessionLearnMoreViewState,
+) : VectorViewModel(initialState) {
+
+ @AssistedFactory
+ interface Factory : MavericksAssistedViewModelFactory {
+ override fun create(initialState: SessionLearnMoreViewState): SessionLearnMoreViewModel
+ }
+
+ companion object : MavericksViewModelFactory by hiltMavericksViewModelFactory()
+
+ override fun handle(action: EmptyAction) {
+ // do nothing
+ }
+}
diff --git a/vector/src/main/java/im/vector/app/features/settings/devices/v2/more/SessionLearnMoreViewState.kt b/vector/src/main/java/im/vector/app/features/settings/devices/v2/more/SessionLearnMoreViewState.kt
new file mode 100644
index 0000000000..cade2ce861
--- /dev/null
+++ b/vector/src/main/java/im/vector/app/features/settings/devices/v2/more/SessionLearnMoreViewState.kt
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2022 New Vector Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package im.vector.app.features.settings.devices.v2.more
+
+import com.airbnb.mvrx.MavericksState
+
+data class SessionLearnMoreViewState(
+ val title: String,
+ val description: String,
+) : MavericksState {
+ constructor(args: SessionLearnMoreBottomSheet.Args) : this(
+ title = args.title,
+ description = args.description,
+ )
+}
diff --git a/vector/src/main/res/layout/bottom_sheet_session_learn_more.xml b/vector/src/main/res/layout/bottom_sheet_session_learn_more.xml
new file mode 100644
index 0000000000..bdfa4b3c1a
--- /dev/null
+++ b/vector/src/main/res/layout/bottom_sheet_session_learn_more.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+