0
0
mirror of https://github.com/thunderbird/thunderbird-android.git synced 2024-09-20 12:12:15 +02:00

Merge pull request #6793 from thundernest/remove_unused_setup_module

Remove unused Gradle module :app:ui:setup
This commit is contained in:
cketti 2023-03-30 13:03:49 +02:00 committed by GitHub
commit 3988d5cca1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
15 changed files with 2 additions and 142 deletions

View File

@ -6,7 +6,6 @@ plugins {
dependencies {
api(projects.app.ui.base)
debugImplementation(projects.app.ui.setup)
implementation(projects.app.core)
implementation(projects.app.autodiscovery.api)
implementation(projects.app.autodiscovery.providersxml)
@ -75,18 +74,9 @@ android {
buildTypes {
debug {
val useNewSetupUi = if (project.hasProperty("k9mail.useNewSetupUi")) {
project.property("k9mail.useNewSetupUi").toString()
} else {
"false"
}
buildConfigField("boolean", "USE_NEW_SETUP_UI_FOR_ONBOARDING", useNewSetupUi)
manifestPlaceholders["appAuthRedirectScheme"] = "FIXME: override this in your app project"
}
release {
buildConfigField("boolean", "USE_NEW_SETUP_UI_FOR_ONBOARDING", "false")
manifestPlaceholders["appAuthRedirectScheme"] = "FIXME: override this in your app project"
}
}

View File

@ -1,15 +0,0 @@
package com.fsck.k9.ui.settings
import com.fsck.k9.ui.R
import com.fsck.k9.ui.settings.SettingsListFragment.SettingsListBuilder
@Deprecated("Remove this once we switch over to the new setup UI")
internal object NewSetupUiHack {
fun addAction(builder: SettingsListBuilder) {
builder.addAction(
"Add account (NEW)",
R.id.action_settingsListScreen_to_newAddAccountScreen,
R.attr.iconSettingsAccountAdd,
)
}
}

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="icon_background">#E4D9FF</color>
</resources>

View File

@ -8,7 +8,6 @@ import android.view.ViewGroup
import android.widget.TextView
import androidx.fragment.app.Fragment
import androidx.navigation.fragment.findNavController
import com.fsck.k9.ui.BuildConfig
import com.fsck.k9.ui.R
import com.fsck.k9.ui.helper.HtmlToSpanned
import com.fsck.k9.ui.observeNotNull
@ -43,12 +42,8 @@ class WelcomeFragment : Fragment() {
}
private fun launchAccountSetup() {
if (BuildConfig.USE_NEW_SETUP_UI_FOR_ONBOARDING) {
findNavController().navigate(R.id.action_welcomeScreen_to_newAddAccountScreen)
} else {
findNavController().navigate(R.id.action_welcomeScreen_to_addAccountScreen)
requireActivity().finish()
}
findNavController().navigate(R.id.action_welcomeScreen_to_addAccountScreen)
requireActivity().finish()
}
private fun launchImportSettings() {

View File

@ -104,8 +104,6 @@ class SettingsListFragment : Fragment(), ItemTouchCallback {
navigationAction = R.id.action_settingsListScreen_to_addAccountScreen,
icon = R.attr.iconSettingsAccountAdd,
)
NewSetupUiHack.addAction(this)
}
addSection(title = getString(R.string.settings_list_backup_category)) {

View File

@ -5,8 +5,6 @@
android:id="@+id/navigation_onboarding"
app:startDestination="@id/welcomeScreen">
<include app:graph="@navigation/navigation_add_account" />
<fragment
android:id="@+id/welcomeScreen"
android:name="com.fsck.k9.ui.onboarding.WelcomeFragment"
@ -21,10 +19,6 @@
android:id="@+id/action_welcomeScreen_to_addAccountScreen"
app:destination="@id/addAccountScreen" />
<action
android:id="@+id/action_welcomeScreen_to_newAddAccountScreen"
app:destination="@id/navigation_add_account" />
<action
android:id="@+id/action_welcomeScreen_to_messageListScreen"
app:destination="@id/messageListScreen" />

View File

@ -5,8 +5,6 @@
android:id="@+id/navigation_settings"
app:startDestination="@id/settingsListScreen">
<include app:graph="@navigation/navigation_add_account" />
<fragment
android:id="@+id/settingsListScreen"
android:name="com.fsck.k9.ui.settings.SettingsListFragment"
@ -29,10 +27,6 @@
android:id="@+id/action_settingsListScreen_to_addAccountScreen"
app:destination="@id/addAccountScreen" />
<action
android:id="@+id/action_settingsListScreen_to_newAddAccountScreen"
app:destination="@id/navigation_add_account" />
<action
android:id="@+id/action_settingsListScreen_to_settingsExportScreen"
app:destination="@id/settingsExportScreen" />

View File

@ -1,8 +0,0 @@
package com.fsck.k9.ui.settings
import com.fsck.k9.ui.settings.SettingsListFragment.SettingsListBuilder
@Deprecated("Remove this once we switch over to the new setup UI")
internal object NewSetupUiHack {
fun addAction(builder: SettingsListBuilder) = Unit
}

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/navigation_add_account">
</navigation>

View File

@ -1,26 +0,0 @@
plugins {
id(ThunderbirdPlugins.Library.android)
}
dependencies {
api(projects.app.ui.base)
implementation(projects.app.core)
implementation(projects.app.autodiscovery.api)
implementation(projects.mail.common)
implementation(libs.androidx.lifecycle.viewmodel.ktx)
implementation(libs.androidx.lifecycle.livedata.ktx)
implementation(libs.androidx.constraintlayout)
implementation(libs.androidx.core.ktx)
implementation(libs.timber)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.kotlinx.coroutines.android)
testImplementation(projects.mail.testing)
testImplementation(projects.app.testing)
testImplementation(libs.robolectric)
}
android {
namespace = "com.fsck.k9.ui.setup"
}

View File

@ -1,13 +0,0 @@
package com.fsck.k9.ui.setup
import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.fragment.app.Fragment
class EnterEmailAddressFragment : Fragment() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
return inflater.inflate(R.layout.fragment_enter_email_address, container, false)
}
}

View File

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
android:text="TODO: Add UI to ask for email address of the account that the user wants to add"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/navigation_add_account"
app:startDestination="@id/enterEmailAddressScreen">
<fragment
android:id="@+id/enterEmailAddressScreen"
android:name="com.fsck.k9.ui.setup.EnterEmailAddressFragment"
android:label="@string/add_account_title"
tools:layout="@layout/fragment_enter_email_address">
</fragment>
</navigation>

View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="add_account_title">Add account</string>
</resources>

View File

@ -28,7 +28,6 @@ include(
include(
":app:k9mail",
":app:ui:base",
":app:ui:setup",
":app:ui:legacy",
":app:ui:message-list-widget",
":app:core",