From 11cd7f30ff90406d30def279c475c663f31daa16 Mon Sep 17 00:00:00 2001 From: Taras Smakula <tarassmakula@gmail.com> Date: Wed, 8 Feb 2023 18:11:41 +0200 Subject: [PATCH] Change room from notification opening --- app/src/main/java/org/futo/circles/MainActivity.kt | 7 +++++++ app/src/main/res/navigation/nav_graph_start_host.xml | 10 +--------- app/src/main/res/values/strings.xml | 1 + 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/org/futo/circles/MainActivity.kt b/app/src/main/java/org/futo/circles/MainActivity.kt index 596b220bf..63ca67a4d 100644 --- a/app/src/main/java/org/futo/circles/MainActivity.kt +++ b/app/src/main/java/org/futo/circles/MainActivity.kt @@ -1,5 +1,6 @@ package org.futo.circles +import android.content.Context import android.content.Intent import android.os.Bundle import android.widget.Toast @@ -46,5 +47,11 @@ class MainActivity : BaseActivity(R.layout.activity_main) { companion object { private const val IS_CLEAR_CACHE = "is_clear_cache" + const val ROOM_ID_PARAM = "roomId" + fun getOpenRoomIntent(context: Context, roomId: String): Intent = + Intent(context, MainActivity::class.java).apply { + action = "OPEN_ROOM" + putExtra(ROOM_ID_PARAM, roomId) + } } } \ No newline at end of file diff --git a/app/src/main/res/navigation/nav_graph_start_host.xml b/app/src/main/res/navigation/nav_graph_start_host.xml index 9d61ae83c..65887884f 100644 --- a/app/src/main/res/navigation/nav_graph_start_host.xml +++ b/app/src/main/res/navigation/nav_graph_start_host.xml @@ -56,15 +56,7 @@ <fragment android:id="@+id/bottomNavigationFragment" android:name="org.futo.circles.feature.home.HomeFragment" - tools:layout="@layout/fragment_bottom_navigation"> - - <argument - android:name="roomId" - android:defaultValue="@null" - app:argType="string" - app:nullable="true" /> - - </fragment> + tools:layout="@layout/fragment_bottom_navigation" /> <fragment android:id="@+id/setupProfileFragment" android:name="org.futo.circles.feature.sign_up.setup_profile.SetupProfileFragment" diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index d1b26846a..89d678903 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -432,6 +432,7 @@ <string name="settings_troubleshoot_test_battery_title">Battery Optimization</string> <string name="settings_troubleshoot_test_battery_success">Circles is not affected by Battery Optimization.</string> <string name="settings_troubleshoot_test_battery_failed">If a user leaves a device unplugged and stationary for a period of time, with the screen off, the device enters Doze mode. This prevents apps from accessing the network and defers their jobs, syncs, and standard alarms. </string> + <string name="shortcut_disabled">Shortcut disabled</string> <string-array name="report_categories"> <item>@string/crude_language</item> -- GitLab