Repository: thunderbird/thunderbird-android
File: core/preference/api/src/commonMain/kotlin/net/thunderbird/core/preference/GeneralSettingsManager.kt (Kotlin)

Code before:
interface GeneralSettingsManager {
    fun getSettings(): GeneralSettings
    fun getSettingsFlow(): Flow<GeneralSettings>

    fun setShowRecentChanges(showRecentChanges: Boolean)
    fun setAppTheme(appTheme: AppTheme)
    fun setMessageViewTheme(subTheme: SubTheme)
    fun setMessageComposeTheme(subTheme: SubTheme)
    fun setFixedMessageViewTheme(fixedMessageViewTheme: Boolean)
    fun setIsShowUnifiedInbox(isShowUnifiedInbox: Boolean)
    fun setIsShowStarredCount(isShowStarredCount: Boolean)
    fun setIsShowMessageListStars(isShowMessageListStars: Boolean)
    fun setIsShowAnimations(isShowAnimations: Boolean)
    fun setIsShowCorrespondentNames(isShowCorrespondentNames: Boolean)
    fun setSetupArchiveShouldNotShowAgain(shouldShowSetupArchiveFolderDialog: Boolean)
    fun setIsMessageListSenderAboveSubject(isMessageListSenderAboveSubject: Boolean)
    fun setIsShowContactName(isShowContactName: Boolean)
    fun setIsShowContactPicture(isShowContactPicture: Boolean)
    fun setIsChangeContactNameColor(isChangeContactNameColor: Boolean)
    fun setIsColorizeMissingContactPictures(isColorizeMissingContactPictures: Boolean)
    fun setIsUseBackgroundAsUnreadIndicator(isUseBackgroundAsUnreadIndicator: Boolean)
    fun setIsShowComposeButtonOnMessageList(isShowComposeButtonOnMessageList: Boolean)
    fun setIsThreadedViewEnabled(isThreadedViewEnabled: Boolean)
    fun setIsUseMessageViewFixedWidthFont(isUseMessageViewFixedWidthFont: Boolean)
    fun setIsAutoFitWidth(isAutoFitWidth: Boolean)
    fun setIsHideTimeZone(isHideTimeZone: Boolean)
}


Review comment (suggestion):
I believe we need to take a step back and consider how to better organize this interface by splitting it into smaller components. Currently, the `GeneralSettingsManager` has 23 functions (24 if we include this new one), while our threshold is set at 11 according to Detekt, and this number keeps increasing.

Before adding another function, we should reflect on the specific types of settings we are dealing with. For instance, since this relates to privacy settings, it would be more appropriate to create a `PrivacySettingsManager` rather than including it in the generic settings manager.

In terms of implementation, we could still use the `RealGeneralSettingsManager` as the underlying implementation for the `PrivacySettingsManager`. Additionally, we could have `GeneralSettingsManager` implement `PrivacySettingsManager` for simplicity. However, I would prefer to use composition over inheritance in this case.

Code after:
 */
interface GeneralSettingsManager : PrivacySettingsManager {
    fun getSettings(): GeneralSettings
    fun getSettingsFlow(): Flow<GeneralSettings>

    fun setShowRecentChanges(showRecentChanges: Boolean)
    fun setAppTheme(appTheme: AppTheme)
    fun setMessageViewTheme(subTheme: SubTheme)
    fun setMessageComposeTheme(subTheme: SubTheme)
    fun setFixedMessageViewTheme(fixedMessageViewTheme: Boolean)
    fun setIsShowUnifiedInbox(isShowUnifiedInbox: Boolean)
    fun setIsShowStarredCount(isShowStarredCount: Boolean)
    fun setIsShowMessageListStars(isShowMessageListStars: Boolean)
    fun setIsShowAnimations(isShowAnimations: Boolean)
    fun setIsShowCorrespondentNames(isShowCorrespondentNames: Boolean)
    fun setSetupArchiveShouldNotShowAgain(shouldShowSetupArchiveFolderDialog: Boolean)
    fun setIsMessageListSenderAboveSubject(isMessageListSenderAboveSubject: Boolean)
    fun setIsShowContactName(isShowContactName: Boolean)
    fun setIsShowContactPicture(isShowContactPicture: Boolean)
    fun setIsChangeContactNameColor(isChangeContactNameColor: Boolean)
    fun setIsColorizeMissingContactPictures(isColorizeMissingContactPictures: Boolean)
    fun setIsUseBackgroundAsUnreadIndicator(isUseBackgroundAsUnreadIndicator: Boolean)
    fun setIsShowComposeButtonOnMessageList(isShowComposeButtonOnMessageList: Boolean)
    fun setIsThreadedViewEnabled(isThreadedViewEnabled: Boolean)
    fun setIsUseMessageViewFixedWidthFont(isUseMessageViewFixedWidthFont: Boolean)
    fun setIsAutoFitWidth(isAutoFitWidth: Boolean)
    fun setQuietTimeEnds(quietTimeEnds: String)
    fun setQuietTimeStarts(quietTimeStarts: String)
    fun setIsQuietTimeEnabled(isQuietTimeEnabled: Boolean)
}