Skip to content

Commit

Permalink
Merge pull request #8370 from cketti/folder_class_cleanup
Browse files Browse the repository at this point in the history
Move `FolderClass`
  • Loading branch information
cketti authored Oct 21, 2024
2 parents 16f144e + eaa219f commit d761c58
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import java.util.Map;
import java.util.TreeMap;

import com.fsck.k9.mail.FolderClass;
import com.fsck.k9.preferences.legacy.FolderClass;
import com.fsck.k9.preferences.Settings.BooleanSetting;
import com.fsck.k9.preferences.Settings.EnumSetting;
import com.fsck.k9.preferences.Settings.SettingsDescription;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.fsck.k9.preferences.legacy

internal enum class FolderClass {
NO_CLASS,
INHERITED,
FIRST_CLASS,
SECOND_CLASS,
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.fsck.k9.preferences.upgrader

import app.k9mail.legacy.account.Account.FolderMode
import com.fsck.k9.mail.FolderClass
import com.fsck.k9.preferences.CombinedSettingsUpgrader
import com.fsck.k9.preferences.InternalSettingsMap
import com.fsck.k9.preferences.ValidatedSettings
import com.fsck.k9.preferences.legacy.FolderClass

class CombinedSettingsUpgraderTo100 : CombinedSettingsUpgrader {
override fun upgrade(account: ValidatedSettings.Account): ValidatedSettings.Account {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.fsck.k9.preferences.upgrader

import app.k9mail.legacy.account.Account.FolderMode
import com.fsck.k9.mail.FolderClass
import com.fsck.k9.preferences.CombinedSettingsUpgrader
import com.fsck.k9.preferences.InternalSettingsMap
import com.fsck.k9.preferences.ValidatedSettings
import com.fsck.k9.preferences.legacy.FolderClass

class CombinedSettingsUpgraderTo96 : CombinedSettingsUpgrader {
override fun upgrade(account: ValidatedSettings.Account): ValidatedSettings.Account {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.fsck.k9.preferences.upgrader

import app.k9mail.legacy.account.Account.FolderMode
import com.fsck.k9.mail.FolderClass
import com.fsck.k9.preferences.CombinedSettingsUpgrader
import com.fsck.k9.preferences.InternalSettingsMap
import com.fsck.k9.preferences.ValidatedSettings
import com.fsck.k9.preferences.legacy.FolderClass

class CombinedSettingsUpgraderTo98 : CombinedSettingsUpgrader {
override fun upgrade(account: ValidatedSettings.Account): ValidatedSettings.Account {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.fsck.k9.preferences.upgrader

import app.k9mail.legacy.account.Account.FolderMode
import com.fsck.k9.mail.FolderClass
import com.fsck.k9.preferences.CombinedSettingsUpgrader
import com.fsck.k9.preferences.InternalSettingsMap
import com.fsck.k9.preferences.ValidatedSettings
import com.fsck.k9.preferences.legacy.FolderClass

class CombinedSettingsUpgraderTo99 : CombinedSettingsUpgrader {
override fun upgrade(account: ValidatedSettings.Account): ValidatedSettings.Account {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package com.fsck.k9.preferences.upgrader
import app.k9mail.legacy.account.Account.FolderMode
import assertk.assertThat
import assertk.assertions.containsExactlyInAnyOrder
import com.fsck.k9.mail.FolderClass
import com.fsck.k9.preferences.InternalSettingsMap
import com.fsck.k9.preferences.ValidatedSettings
import com.fsck.k9.preferences.legacy.FolderClass
import kotlin.test.Test

class CombinedSettingsUpgraderTo100Test {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package com.fsck.k9.preferences.upgrader
import app.k9mail.legacy.account.Account.FolderMode
import assertk.assertThat
import assertk.assertions.containsExactlyInAnyOrder
import com.fsck.k9.mail.FolderClass
import com.fsck.k9.preferences.InternalSettingsMap
import com.fsck.k9.preferences.ValidatedSettings
import com.fsck.k9.preferences.legacy.FolderClass
import kotlin.test.Test

class CombinedSettingsUpgraderTo96Test {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package com.fsck.k9.preferences.upgrader
import app.k9mail.legacy.account.Account.FolderMode
import assertk.assertThat
import assertk.assertions.containsExactlyInAnyOrder
import com.fsck.k9.mail.FolderClass
import com.fsck.k9.preferences.InternalSettingsMap
import com.fsck.k9.preferences.ValidatedSettings
import com.fsck.k9.preferences.legacy.FolderClass
import kotlin.test.Test

class CombinedSettingsUpgraderTo98Test {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package com.fsck.k9.preferences.upgrader
import app.k9mail.legacy.account.Account.FolderMode
import assertk.assertThat
import assertk.assertions.containsExactlyInAnyOrder
import com.fsck.k9.mail.FolderClass
import com.fsck.k9.preferences.InternalSettingsMap
import com.fsck.k9.preferences.ValidatedSettings
import com.fsck.k9.preferences.legacy.FolderClass
import kotlin.test.Test

class CombinedSettingsUpgraderTo99Test {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.fsck.k9.storage.migrations

import android.database.sqlite.SQLiteDatabase
import com.fsck.k9.mail.FolderClass

internal class MigrationTo70(private val db: SQLiteDatabase) {
fun removePushState() {
Expand Down Expand Up @@ -32,7 +31,7 @@ internal class MigrationTo70(private val db: SQLiteDatabase) {
"poll_class TEXT, " +
"push_class TEXT, " +
"display_class TEXT, " +
"notify_class TEXT default '" + FolderClass.INHERITED.name + "', " +
"notify_class TEXT default 'INHERITED', " +
"more_messages TEXT default \"unknown\", " +
"server_id TEXT, " +
"local_only INTEGER, " +
Expand Down
5 changes: 0 additions & 5 deletions mail/common/src/main/java/com/fsck/k9/mail/FolderClass.java

This file was deleted.

0 comments on commit d761c58

Please sign in to comment.