Skip to content

Commit 5c883fb

Browse files
authored
Merge pull request #9890 from wmontwe/fix-deprecation-message
fix: change deprecation to discouraged to reduce the build warnings
2 parents 9f7d32d + 469741f commit 5c883fb

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

core/android/account/src/main/kotlin/net/thunderbird/core/android/account/LegacyAccountDto.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package net.thunderbird.core.android.account
22

3+
import androidx.annotation.Discouraged
34
import com.fsck.k9.mail.Address
45
import com.fsck.k9.mail.ServerSettings
56
import java.util.Calendar
@@ -21,7 +22,10 @@ const val DEFAULT_VISIBLE_LIMIT = 25
2122
/**
2223
* Account stores all of the settings for a single account defined by the user. Each account is defined by a UUID.
2324
*/
24-
@Deprecated(message = "Use LegacyAccount instead, this class is only for compatibility with existing code.")
25+
@Discouraged(
26+
message = "Use net.thunderbird.core.android.account.LegacyAccount instead, " +
27+
"this class is only for compatibility with existing code.",
28+
)
2529
@Suppress("TooManyFunctions")
2630
open class LegacyAccountDto(
2731
override val uuid: String,

core/android/account/src/main/kotlin/net/thunderbird/core/android/account/LegacyAccountDtoManager.kt

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
package net.thunderbird.core.android.account
22

3+
import androidx.annotation.Discouraged
34
import kotlinx.coroutines.flow.Flow
45
import net.thunderbird.feature.mail.account.api.AccountManager
56

6-
@Deprecated(
7-
message = "Use net.thunderbird.core.android.account.LegacyAccountManager instead",
8-
replaceWith = ReplaceWith(
9-
expression = "LegacyAccountManager",
10-
"net.thunderbird.core.android.account.LegacyAccountManager",
11-
),
7+
@Discouraged(
8+
message = "Use net.thunderbird.core.android.account.LegacyAccountManager instead.",
129
)
1310
interface LegacyAccountDtoManager : AccountManager<LegacyAccountDto> {
1411
override fun getAccounts(): List<LegacyAccountDto>

0 commit comments

Comments
 (0)