From d4fea4419a7b7f137ec9afd95640bad8baf82b92 Mon Sep 17 00:00:00 2001 From: Adolfo Santiago Date: Mon, 9 May 2022 13:44:20 +0200 Subject: [PATCH] Remove newHusky flavor --- husky/app/build.gradle | 15 ---- husky/app/src/main/AndroidManifest.xml | 12 --- husky/app/src/newhusky/AndroidManifest.xml | 42 --------- .../com/husky/project/HuskyApplication.kt | 26 ------ .../husky/project/core/di/GlobalServices.kt | 16 ---- .../husky/project/core/extensions/JobExt.kt | 9 -- .../project/core/extensions/LifecycleExt.kt | 32 ------- .../core/navigation/NavigationActivity.kt | 87 ------------------- .../project/core/ui/fragment/BaseFragment.kt | 30 ------- .../project/core/ui/navigation/BaseKey.kt | 27 ------ .../core/ui/navigation/BaseServiceKey.kt | 27 ------ .../core/ui/viewmodel/BaseViewModel.kt | 33 ------- .../ui/viewmodel/CloseableCoroutineScope.kt | 31 ------- .../login/view/fragments/LoginFragment.kt | 69 --------------- .../login/view/navigation/LoginKey.kt | 23 ----- .../login/view/viewmodel/LoginViewModel.kt | 42 --------- .../view/viewmodel/LoginViewModelKeys.kt | 8 -- .../splash/view/fragments/SplashFragment.kt | 26 ------ .../splash/view/navigation/SplashKey.kt | 23 ----- .../splash/view/viewmodel/SplashViewModel.kt | 17 ---- husky/appinfo.gradle | 13 --- 21 files changed, 608 deletions(-) delete mode 100644 husky/app/src/newhusky/AndroidManifest.xml delete mode 100644 husky/app/src/newhusky/java/com/husky/project/HuskyApplication.kt delete mode 100644 husky/app/src/newhusky/java/com/husky/project/core/di/GlobalServices.kt delete mode 100644 husky/app/src/newhusky/java/com/husky/project/core/extensions/JobExt.kt delete mode 100644 husky/app/src/newhusky/java/com/husky/project/core/extensions/LifecycleExt.kt delete mode 100644 husky/app/src/newhusky/java/com/husky/project/core/navigation/NavigationActivity.kt delete mode 100644 husky/app/src/newhusky/java/com/husky/project/core/ui/fragment/BaseFragment.kt delete mode 100644 husky/app/src/newhusky/java/com/husky/project/core/ui/navigation/BaseKey.kt delete mode 100644 husky/app/src/newhusky/java/com/husky/project/core/ui/navigation/BaseServiceKey.kt delete mode 100644 husky/app/src/newhusky/java/com/husky/project/core/ui/viewmodel/BaseViewModel.kt delete mode 100644 husky/app/src/newhusky/java/com/husky/project/core/ui/viewmodel/CloseableCoroutineScope.kt delete mode 100644 husky/app/src/newhusky/java/com/husky/project/features/login/view/fragments/LoginFragment.kt delete mode 100644 husky/app/src/newhusky/java/com/husky/project/features/login/view/navigation/LoginKey.kt delete mode 100644 husky/app/src/newhusky/java/com/husky/project/features/login/view/viewmodel/LoginViewModel.kt delete mode 100644 husky/app/src/newhusky/java/com/husky/project/features/login/view/viewmodel/LoginViewModelKeys.kt delete mode 100644 husky/app/src/newhusky/java/com/husky/project/features/splash/view/fragments/SplashFragment.kt delete mode 100644 husky/app/src/newhusky/java/com/husky/project/features/splash/view/navigation/SplashKey.kt delete mode 100644 husky/app/src/newhusky/java/com/husky/project/features/splash/view/viewmodel/SplashViewModel.kt diff --git a/husky/app/build.gradle b/husky/app/build.gradle index 650953e..edcaeab 100644 --- a/husky/app/build.gradle +++ b/husky/app/build.gradle @@ -70,21 +70,6 @@ android { flavorDimensions buildVersions.flavorDimensions.husky, buildVersions.flavorDimensions.release productFlavors { - newhusky { - dimension buildVersions.flavorDimensions.release - - applicationId buildVersions.newHusky.applicationId - - compileSdkVersion buildVersions.newHusky.compileSdk - minSdkVersion buildVersions.newHusky.minSdk - targetSdkVersion buildVersions.newHusky.targetSdk - - versionCode buildVersions.newHusky.versionCode - versionName buildVersions.newHusky.versionName - - versionNameSuffix = "-${buildVersions.newHusky.suffix}" - } - husky { dimension buildVersions.flavorDimensions.husky } diff --git a/husky/app/src/main/AndroidManifest.xml b/husky/app/src/main/AndroidManifest.xml index 6f6bc10..aefa614 100644 --- a/husky/app/src/main/AndroidManifest.xml +++ b/husky/app/src/main/AndroidManifest.xml @@ -21,18 +21,6 @@ android:theme="@style/TuskyTheme" android:usesCleartextTraffic="false"> - - diff --git a/husky/app/src/newhusky/AndroidManifest.xml b/husky/app/src/newhusky/AndroidManifest.xml deleted file mode 100644 index 9d68d06..0000000 --- a/husky/app/src/newhusky/AndroidManifest.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/husky/app/src/newhusky/java/com/husky/project/HuskyApplication.kt b/husky/app/src/newhusky/java/com/husky/project/HuskyApplication.kt deleted file mode 100644 index 6c404a1..0000000 --- a/husky/app/src/newhusky/java/com/husky/project/HuskyApplication.kt +++ /dev/null @@ -1,26 +0,0 @@ -package com.husky.project - -import android.app.Application -import com.keylesspalace.tusky.core.logging.HyperlinkDebugTree -import com.keylesspalace.tusky.core.utils.ApplicationUtils -import timber.log.Timber - -class HuskyApplication : Application() { - - override fun onCreate() { - super.onCreate() - - enableDebugConfig() - } - - /** - * Enable debug settings at startup. - */ - private fun enableDebugConfig() { - if(ApplicationUtils.isDebug()) { - Timber.plant(HyperlinkDebugTree()) - - Timber.d("Debug config enabled") - } - } -} diff --git a/husky/app/src/newhusky/java/com/husky/project/core/di/GlobalServices.kt b/husky/app/src/newhusky/java/com/husky/project/core/di/GlobalServices.kt deleted file mode 100644 index 6aca453..0000000 --- a/husky/app/src/newhusky/java/com/husky/project/core/di/GlobalServices.kt +++ /dev/null @@ -1,16 +0,0 @@ -package com.husky.project.core.di - -import android.content.Context -import com.zhuinden.simplestack.GlobalServices - -class HuskyServices(private val appContext: Context) { - - fun getGlobalServices(): GlobalServices { - val builder = GlobalServices.builder() - - with(builder) { - } - - return builder.build() - } -} diff --git a/husky/app/src/newhusky/java/com/husky/project/core/extensions/JobExt.kt b/husky/app/src/newhusky/java/com/husky/project/core/extensions/JobExt.kt deleted file mode 100644 index 4e3ecb5..0000000 --- a/husky/app/src/newhusky/java/com/husky/project/core/extensions/JobExt.kt +++ /dev/null @@ -1,9 +0,0 @@ -package com.husky.project.core.extensions - -import kotlinx.coroutines.Job - -fun Job?.cancelIfActive() { - if(this?.isActive == true) { - this.cancel() - } -} diff --git a/husky/app/src/newhusky/java/com/husky/project/core/extensions/LifecycleExt.kt b/husky/app/src/newhusky/java/com/husky/project/core/extensions/LifecycleExt.kt deleted file mode 100644 index e402896..0000000 --- a/husky/app/src/newhusky/java/com/husky/project/core/extensions/LifecycleExt.kt +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Husky -- A Pleroma client for Android - * - * Copyright (C) 2021 The Husky Developers - * - * This program 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 3 of the License, or - * (at your option) any later version. - * - * This program 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 this program. If not, see . - */ - -package com.husky.project.core.extensions - -import androidx.fragment.app.Fragment -import androidx.lifecycle.LiveData -import androidx.lifecycle.Observer - -fun > Fragment.viewObserve(liveData: L, body: (T?) -> Unit) = - liveData.observe(viewLifecycleOwner, Observer(body)) - -/*fun > Fragment.viewFailureObserve( - liveData: L, - body: (Failure?) -> Unit -) = liveData.observe(viewLifecycleOwner, Observer(body))*/ diff --git a/husky/app/src/newhusky/java/com/husky/project/core/navigation/NavigationActivity.kt b/husky/app/src/newhusky/java/com/husky/project/core/navigation/NavigationActivity.kt deleted file mode 100644 index 1fbf0f9..0000000 --- a/husky/app/src/newhusky/java/com/husky/project/core/navigation/NavigationActivity.kt +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Husky -- A Pleroma client for Android - * - * Copyright (C) 2021 The Husky Developers - * - * This program 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 3 of the License, or - * (at your option) any later version. - * - * This program 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 this program. If not, see . - */ - -package com.husky.project.core.navigation - -import android.os.Bundle -import androidx.appcompat.app.AppCompatActivity -import com.husky.project.core.di.HuskyServices -import com.husky.project.core.ui.fragment.BaseFragment -import com.husky.project.core.ui.navigation.BaseKey -import com.husky.project.features.splash.view.navigation.SplashKey -import com.keylesspalace.tusky.core.extensions.viewBinding -import com.keylesspalace.tusky.databinding.ActivityNavigationBinding -import com.zhuinden.simplestack.History -import com.zhuinden.simplestack.SimpleStateChanger -import com.zhuinden.simplestack.StateChange -import com.zhuinden.simplestack.navigator.Navigator -import com.zhuinden.simplestackextensions.fragments.DefaultFragmentStateChanger -import com.zhuinden.simplestackextensions.navigatorktx.backstack -import com.zhuinden.simplestackextensions.services.DefaultServiceProvider -import timber.log.Timber - -class NavigationActivity : AppCompatActivity(), SimpleStateChanger.NavigationHandler { - - private val binding by viewBinding(ActivityNavigationBinding::inflate) - private lateinit var fragmentStateChanger: DefaultFragmentStateChanger - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - setContentView(binding.root) - - initNavigation() - } - - override fun onBackPressed() { - val currentFragment = supportFragmentManager.findFragmentByTag( - backstack.top().fragmentTag - ) - if(currentFragment is BaseFragment && currentFragment.onHandleBack()) { - Timber.i("Handled back from Fragment[${currentFragment.tag}]") - if(!backstack.goBack()) { - Timber.i("No keys found, exiting the application...") - - this.finish() - } - } - } - - override fun onNavigationEvent(stateChange: StateChange) { - fragmentStateChanger.handleStateChange(stateChange) - } - - private fun initNavigation() { - fragmentStateChanger = DefaultFragmentStateChanger( - supportFragmentManager, - binding.fragmentContainer.id - ) - - Navigator.configure() - .setStateChanger(SimpleStateChanger(this)) - .setScopedServices(DefaultServiceProvider()) - .setGlobalServices(HuskyServices(applicationContext).getGlobalServices()) - .install( - this, - binding.fragmentContainer, - History.single(SplashKey()) - ) - - Timber.d("Navigation setup completely") - } -} diff --git a/husky/app/src/newhusky/java/com/husky/project/core/ui/fragment/BaseFragment.kt b/husky/app/src/newhusky/java/com/husky/project/core/ui/fragment/BaseFragment.kt deleted file mode 100644 index bc59cad..0000000 --- a/husky/app/src/newhusky/java/com/husky/project/core/ui/fragment/BaseFragment.kt +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Husky -- A Pleroma client for Android - * - * Copyright (C) 2021 The Husky Developers - * - * This program 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 3 of the License, or - * (at your option) any later version. - * - * This program 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 this program. If not, see . - */ - -package com.husky.project.core.ui.fragment - -import androidx.annotation.LayoutRes -import com.zhuinden.simplestackextensions.fragments.KeyedFragment - -open class BaseFragment(@LayoutRes layoutRes: Int) : KeyedFragment(layoutRes) { - - fun onHandleBack(): Boolean { - return true - } -} diff --git a/husky/app/src/newhusky/java/com/husky/project/core/ui/navigation/BaseKey.kt b/husky/app/src/newhusky/java/com/husky/project/core/ui/navigation/BaseKey.kt deleted file mode 100644 index 8bcd646..0000000 --- a/husky/app/src/newhusky/java/com/husky/project/core/ui/navigation/BaseKey.kt +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Husky -- A Pleroma client for Android - * - * Copyright (C) 2021 The Husky Developers - * - * This program 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 3 of the License, or - * (at your option) any later version. - * - * This program 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 this program. If not, see . - */ - -package com.husky.project.core.ui.navigation - -import com.zhuinden.simplestackextensions.fragments.DefaultFragmentKey - -abstract class BaseKey : DefaultFragmentKey() { - - override fun getFragmentTag(): String = this.javaClass.name -} diff --git a/husky/app/src/newhusky/java/com/husky/project/core/ui/navigation/BaseServiceKey.kt b/husky/app/src/newhusky/java/com/husky/project/core/ui/navigation/BaseServiceKey.kt deleted file mode 100644 index bd3ce52..0000000 --- a/husky/app/src/newhusky/java/com/husky/project/core/ui/navigation/BaseServiceKey.kt +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Husky -- A Pleroma client for Android - * - * Copyright (C) 2021 The Husky Developers - * - * This program 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 3 of the License, or - * (at your option) any later version. - * - * This program 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 this program. If not, see . - */ - -package com.husky.project.core.ui.navigation - -import com.zhuinden.simplestackextensions.services.DefaultServiceProvider - -abstract class BaseServiceKey : BaseKey(), DefaultServiceProvider.HasServices { - - override fun getScopeTag(): String = this.javaClass.name -} diff --git a/husky/app/src/newhusky/java/com/husky/project/core/ui/viewmodel/BaseViewModel.kt b/husky/app/src/newhusky/java/com/husky/project/core/ui/viewmodel/BaseViewModel.kt deleted file mode 100644 index 8f1263a..0000000 --- a/husky/app/src/newhusky/java/com/husky/project/core/ui/viewmodel/BaseViewModel.kt +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Husky -- A Pleroma client for Android - * - * Copyright (C) 2021 The Husky Developers - * - * This program 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 3 of the License, or - * (at your option) any later version. - * - * This program 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 this program. If not, see . - */ - -package com.husky.project.core.ui.viewmodel - -import com.zhuinden.simplestack.Bundleable -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.SupervisorJob - -abstract class BaseViewModel : Bundleable { - - val viewModelScope: CoroutineScope - get() { - return CloseableCoroutineScope(SupervisorJob() + Dispatchers.Main.immediate) - } -} diff --git a/husky/app/src/newhusky/java/com/husky/project/core/ui/viewmodel/CloseableCoroutineScope.kt b/husky/app/src/newhusky/java/com/husky/project/core/ui/viewmodel/CloseableCoroutineScope.kt deleted file mode 100644 index c00d4dc..0000000 --- a/husky/app/src/newhusky/java/com/husky/project/core/ui/viewmodel/CloseableCoroutineScope.kt +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2018 The Android Open Source Project - * - * 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 com.husky.project.core.ui.viewmodel - -import java.io.Closeable -import kotlin.coroutines.CoroutineContext -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.cancel - -internal class CloseableCoroutineScope(context: CoroutineContext) : Closeable, CoroutineScope { - - override val coroutineContext: CoroutineContext = context - - override fun close() { - coroutineContext.cancel() - } -} diff --git a/husky/app/src/newhusky/java/com/husky/project/features/login/view/fragments/LoginFragment.kt b/husky/app/src/newhusky/java/com/husky/project/features/login/view/fragments/LoginFragment.kt deleted file mode 100644 index 616736d..0000000 --- a/husky/app/src/newhusky/java/com/husky/project/features/login/view/fragments/LoginFragment.kt +++ /dev/null @@ -1,69 +0,0 @@ -package com.husky.project.features.login.view.fragments - -import android.os.Bundle -import android.view.View -import androidx.appcompat.app.AlertDialog -import com.keylesspalace.tusky.R -import com.keylesspalace.tusky.core.extensions.addHttpsProtocolUrl -import com.keylesspalace.tusky.core.extensions.dialogWithLink -import com.keylesspalace.tusky.core.extensions.viewBinding -import com.husky.project.core.extensions.viewObserve -import com.husky.project.core.ui.fragment.BaseFragment -import com.keylesspalace.tusky.databinding.ActivityLoginBinding -import com.husky.project.features.login.view.viewmodel.LoginViewModel -import com.keylesspalace.tusky.util.afterTextChanged -import com.zhuinden.simplestackextensions.fragmentsktx.lookup - -class LoginFragment : BaseFragment(R.layout.activity_login) { - - private val binding by viewBinding(ActivityLoginBinding::bind) - private val viewModel by lazy { lookup() } - - override fun onViewCreated(view: View, savedInstanceState: Bundle?) { - super.onViewCreated(view, savedInstanceState) - - initObservers() - initListeners() - } - - private fun initObservers() { - with(viewModel) { - viewObserve(verifyUrl, ::handleVerifyUrl) - } - } - - private fun initListeners() { - binding.domainEditText.afterTextChanged { - if(it.isEmpty()) { - setDomainUrlError(false) - } - } - - binding.loginButton.setOnClickListener { - viewModel.verifyUrl(binding.domainEditText.text.toString().addHttpsProtocolUrl()) - } - - binding.whatsAnInstanceTextView.setOnClickListener { - AlertDialog.Builder(requireActivity()).dialogWithLink( - getString(R.string.dialog_whats_an_instance), - getString(R.string.action_close) - ) - } - } - - private fun handleVerifyUrl(isValid: Boolean?) { - isValid?.let { valid -> - if(valid == true) { - } - setDomainUrlError(isValid) - } - } - - private fun setDomainUrlError(isValid: Boolean) { - binding.domainTextInputLayout.error = if(isValid) { - null - } else { - getString(R.string.error_invalid_domain) - } - } -} diff --git a/husky/app/src/newhusky/java/com/husky/project/features/login/view/navigation/LoginKey.kt b/husky/app/src/newhusky/java/com/husky/project/features/login/view/navigation/LoginKey.kt deleted file mode 100644 index 0ccec42..0000000 --- a/husky/app/src/newhusky/java/com/husky/project/features/login/view/navigation/LoginKey.kt +++ /dev/null @@ -1,23 +0,0 @@ -package com.husky.project.features.login.view.navigation - -import androidx.fragment.app.Fragment -import com.husky.project.core.ui.navigation.BaseServiceKey -import com.husky.project.features.login.view.fragments.LoginFragment -import com.husky.project.features.login.view.viewmodel.LoginViewModel -import com.zhuinden.simplestack.ServiceBinder -import com.zhuinden.simplestackextensions.servicesktx.add -import kotlinx.android.parcel.Parcelize - -@Parcelize -class LoginKey : BaseServiceKey() { - - override fun instantiateFragment(): Fragment { - return LoginFragment() - } - - override fun bindServices(serviceBinder: ServiceBinder) { - with(serviceBinder) { - add(LoginViewModel()) - } - } -} diff --git a/husky/app/src/newhusky/java/com/husky/project/features/login/view/viewmodel/LoginViewModel.kt b/husky/app/src/newhusky/java/com/husky/project/features/login/view/viewmodel/LoginViewModel.kt deleted file mode 100644 index bfb60c3..0000000 --- a/husky/app/src/newhusky/java/com/husky/project/features/login/view/viewmodel/LoginViewModel.kt +++ /dev/null @@ -1,42 +0,0 @@ -package com.husky.project.features.login.view.viewmodel - -import android.util.Patterns -import androidx.lifecycle.LiveData -import androidx.lifecycle.MutableLiveData -import com.husky.project.core.extensions.cancelIfActive -import com.husky.project.core.ui.viewmodel.BaseViewModel -import com.husky.project.features.login.view.viewmodel.LoginViewModelKeys.Bundle -import com.keylesspalace.tusky.core.extensions.orEmpty -import com.zhuinden.statebundle.StateBundle -import kotlinx.coroutines.Job -import kotlinx.coroutines.launch - -class LoginViewModel : BaseViewModel() { - - private var ver: Job? = null - - private val _verifyUrl = MutableLiveData() - val verifyUrl: LiveData - get() = _verifyUrl - - override fun toBundle(): StateBundle = StateBundle().apply { - putBoolean( - Bundle.VERIFY_URL, - _verifyUrl.value.orEmpty() - ) - } - - override fun fromBundle(bundle: StateBundle?) { - bundle?.run { - _verifyUrl.value = getBoolean(Bundle.VERIFY_URL) - } - } - - fun verifyUrl(url: String) { - ver?.cancelIfActive() - ver = viewModelScope.launch { - - } - _verifyUrl.value = Patterns.WEB_URL.matcher(url).matches() - } -} diff --git a/husky/app/src/newhusky/java/com/husky/project/features/login/view/viewmodel/LoginViewModelKeys.kt b/husky/app/src/newhusky/java/com/husky/project/features/login/view/viewmodel/LoginViewModelKeys.kt deleted file mode 100644 index 18fd34a..0000000 --- a/husky/app/src/newhusky/java/com/husky/project/features/login/view/viewmodel/LoginViewModelKeys.kt +++ /dev/null @@ -1,8 +0,0 @@ -package com.husky.project.features.login.view.viewmodel - -sealed class LoginViewModelKeys { - - object Bundle { - const val VERIFY_URL = "verifyUrl" - } -} diff --git a/husky/app/src/newhusky/java/com/husky/project/features/splash/view/fragments/SplashFragment.kt b/husky/app/src/newhusky/java/com/husky/project/features/splash/view/fragments/SplashFragment.kt deleted file mode 100644 index 968487a..0000000 --- a/husky/app/src/newhusky/java/com/husky/project/features/splash/view/fragments/SplashFragment.kt +++ /dev/null @@ -1,26 +0,0 @@ -package com.husky.project.features.splash.view.fragments - -import android.os.Bundle -import android.view.View -import com.keylesspalace.tusky.R -import com.keylesspalace.tusky.core.extensions.viewBinding -import com.husky.project.core.ui.fragment.BaseFragment -import com.keylesspalace.tusky.databinding.FragmentSplashBinding -import com.husky.project.features.login.view.navigation.LoginKey -import com.husky.project.features.splash.view.viewmodel.SplashViewModel -import com.zhuinden.simplestack.History -import com.zhuinden.simplestack.StateChange -import com.zhuinden.simplestackextensions.fragmentsktx.backstack -import com.zhuinden.simplestackextensions.fragmentsktx.lookup - -class SplashFragment : BaseFragment(R.layout.fragment_splash) { - - private val binding by viewBinding(FragmentSplashBinding::bind) - private val viewModel by lazy { lookup() } - - override fun onViewCreated(view: View, savedInstanceState: Bundle?) { - super.onViewCreated(view, savedInstanceState) - - backstack.setHistory(History.single(LoginKey()), StateChange.FORWARD) - } -} diff --git a/husky/app/src/newhusky/java/com/husky/project/features/splash/view/navigation/SplashKey.kt b/husky/app/src/newhusky/java/com/husky/project/features/splash/view/navigation/SplashKey.kt deleted file mode 100644 index fdcbb35..0000000 --- a/husky/app/src/newhusky/java/com/husky/project/features/splash/view/navigation/SplashKey.kt +++ /dev/null @@ -1,23 +0,0 @@ -package com.husky.project.features.splash.view.navigation - -import androidx.fragment.app.Fragment -import com.husky.project.core.ui.navigation.BaseServiceKey -import com.husky.project.features.splash.view.fragments.SplashFragment -import com.husky.project.features.splash.view.viewmodel.SplashViewModel -import com.zhuinden.simplestack.ServiceBinder -import com.zhuinden.simplestackextensions.servicesktx.add -import kotlinx.android.parcel.Parcelize - -@Parcelize -class SplashKey : BaseServiceKey() { - - override fun instantiateFragment(): Fragment { - return SplashFragment() - } - - override fun bindServices(serviceBinder: ServiceBinder) { - with(serviceBinder) { - add(SplashViewModel()) - } - } -} diff --git a/husky/app/src/newhusky/java/com/husky/project/features/splash/view/viewmodel/SplashViewModel.kt b/husky/app/src/newhusky/java/com/husky/project/features/splash/view/viewmodel/SplashViewModel.kt deleted file mode 100644 index 9410913..0000000 --- a/husky/app/src/newhusky/java/com/husky/project/features/splash/view/viewmodel/SplashViewModel.kt +++ /dev/null @@ -1,17 +0,0 @@ -package com.husky.project.features.splash.view.viewmodel - -import com.husky.project.core.ui.viewmodel.BaseViewModel -import com.zhuinden.statebundle.StateBundle - -class SplashViewModel : BaseViewModel() { - - override fun toBundle(): StateBundle { - val stateBundle = StateBundle() - - return stateBundle - } - - override fun fromBundle(bundle: StateBundle?) { - bundle?.let {} - } -} diff --git a/husky/appinfo.gradle b/husky/appinfo.gradle index c6e2f59..0180d3c 100644 --- a/husky/appinfo.gradle +++ b/husky/appinfo.gradle @@ -30,19 +30,6 @@ dev.versionCode = 1 dev.versionName = "1.0.0" buildVersions.dev = dev -// Husky refactor info -def newHusky = [:] -newHusky.suffix = "newHusky" -newHusky.applicationId = "su.xash.husky.${newHusky.suffix}" - -newHusky.compileSdk = 30 -newHusky.minSdk = 23 -newHusky.targetSdk = 30 - -newHusky.versionCode = 1 -newHusky.versionName = "2.0.0" -buildVersions.newHusky = newHusky - // Flavors dimensions def flavorDimensions = [:] flavorDimensions.husky = "husky"