compose: Migrate onboarding logic to compose

* Still needs implementation for showing microG installation screen on huawei
* No anonymous mode on huawei
* Needs handling for showing permissions screen via settings

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2025-11-26 16:06:58 +08:00
parent 41b12cfbd8
commit 709e0ec1ca
42 changed files with 527 additions and 2307 deletions

View File

@@ -1,82 +0,0 @@
/*
* Aurora Store
* Copyright (C) 2021, Rahul Kumar Patel <whyorean@gmail.com>
*
* Aurora Store is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* Aurora Store is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with Aurora Store. If not, see <http://www.gnu.org/licenses/>.
*
*/
package com.aurora.store.view.ui.onboarding
import androidx.fragment.app.Fragment
import com.aurora.Constants
import com.aurora.store.util.Preferences.PREFERENCE_AUTO_DELETE
import com.aurora.store.util.Preferences.PREFERENCE_DEFAULT_SELECTED_TAB
import com.aurora.store.util.Preferences.PREFERENCE_DISPENSER_URLS
import com.aurora.store.util.Preferences.PREFERENCE_FILTER_AURORA_ONLY
import com.aurora.store.util.Preferences.PREFERENCE_FILTER_FDROID
import com.aurora.store.util.Preferences.PREFERENCE_FOR_YOU
import com.aurora.store.util.Preferences.PREFERENCE_INSTALLER_ID
import com.aurora.store.util.Preferences.PREFERENCE_THEME_STYLE
import com.aurora.store.util.Preferences.PREFERENCE_UPDATES_CHECK_INTERVAL
import com.aurora.store.util.Preferences.PREFERENCE_UPDATES_EXTENDED
import com.aurora.store.util.Preferences.PREFERENCE_VENDING_VERSION
import com.aurora.store.util.save
import dagger.hilt.android.AndroidEntryPoint
@AndroidEntryPoint
class OnboardingFragment : BaseFlavouredOnboardingFragment() {
override fun loadDefaultPreferences() {
/*Filters*/
save(PREFERENCE_FILTER_AURORA_ONLY, false)
save(PREFERENCE_FILTER_FDROID, true)
/*Network*/
save(PREFERENCE_DISPENSER_URLS, setOf(Constants.URL_DISPENSER))
save(PREFERENCE_VENDING_VERSION, 0)
/*Customization*/
save(PREFERENCE_THEME_STYLE, 0)
save(PREFERENCE_DEFAULT_SELECTED_TAB, 0)
save(PREFERENCE_FOR_YOU, true)
/*Installer*/
save(PREFERENCE_AUTO_DELETE, true)
save(PREFERENCE_INSTALLER_ID, 0)
/*Updates*/
save(PREFERENCE_UPDATES_EXTENDED, false)
save(PREFERENCE_UPDATES_CHECK_INTERVAL, 3)
}
override fun onboardingPages(): List<Fragment> {
return listOf(
WelcomeFragment(),
PermissionsFragment.newInstance()
)
}
override fun setupAutoUpdates() {
super.setupAutoUpdates()
// Remove super & implement variant logic here
}
override fun finishOnboarding() {
super.finishOnboarding()
// Remove super & implement variant logic here
}
}