Skip to content

Commit cb350e6

Browse files
committed
Enable Welcome message for v3
1 parent 7bc4a88 commit cb350e6

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

app/src/main/java/com/gaurav/avnc/ui/home/HomeActivity.kt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,13 @@ class HomeActivity : AppCompatActivity() {
156156
}
157157

158158
private fun showWelcomeMsg() {
159-
/*if (!viewModel.pref.runInfo.hasShownV2WelcomeMsg) {
160-
viewModel.pref.runInfo.hasShownV2WelcomeMsg = true
161-
@Suppress("DEPRECATION")
159+
if (!viewModel.pref.runInfo.hasShownV3WelcomeMsg) {
160+
viewModel.pref.runInfo.hasShownV3WelcomeMsg = true
162161
packageManager.getPackageInfo(packageName, 0).let {
163162
if (it.lastUpdateTime > it.firstInstallTime)
164-
WelcomeFragment().show(supportFragmentManager, "WelcomeV2")
163+
WelcomeFragment().show(supportFragmentManager, "WelcomeV3")
165164
}
166-
}*/
165+
}
167166
}
168167

169168
/**

app/src/main/java/com/gaurav/avnc/ui/home/WelcomeFragment.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import com.google.android.material.bottomsheet.BottomSheetDialog
2020
import com.google.android.material.bottomsheet.BottomSheetDialogFragment
2121

2222
/**
23-
* Simple fragment to show welcome message after V2 update
23+
* Simple fragment to show welcome message after major updates
2424
*/
2525
class WelcomeFragment : BottomSheetDialogFragment() {
2626

app/src/main/java/com/gaurav/avnc/util/AppPreferences.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class AppPreferences(context: Context) {
9696
*/
9797
inner class RunInfo {
9898
var hasShownViewerHelp by BooleanPref("run_info_has_shown_viewer_help", false)
99-
var hasShownV2WelcomeMsg by BooleanPref("run_info_has_shown_v2_welcome_msg", false)
99+
var hasShownV3WelcomeMsg by BooleanPref("run_info_has_shown_v3_welcome_msg", false)
100100
var showVirtualKeys by BooleanPref("run_info_show_virtual_keys", false)
101101
var toolbarOpenerBtnVerticalBias by FloatPref("run_info_toolbar_opener_vertical_bias", .5f)
102102
}

app/src/main/res/layout/fragment_welcome.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
android:layout_height="wrap_content"
2323
android:layout_gravity="center"
2424
android:layout_marginTop="@dimen/margin_small"
25-
android:text="🎉 Welcome to AVNC v2 🎉"
25+
android:text="🎉 Welcome to AVNC v3 🎉"
2626
android:textAppearance="@style/TextAppearance.MaterialComponents.Headline5" />
2727

2828
<TextView
2929
android:layout_width="wrap_content"
3030
android:layout_height="wrap_content"
3131
android:layout_marginTop="@dimen/margin_large"
32-
android:text="Use per-orientation zoom, change default zoom, control image quality, improved virtual keys, and much more. See what's new in version 2."
32+
android:text="Disable video to use AVNC as remote control, Capture pointer for seamless experience, Use Wake-on-LAN over Internet, and much more. See what's new in version 3."
3333
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1" />
3434

3535
<Button

0 commit comments

Comments
 (0)