-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add mechanism to listen for general settings changes #8763
Changes from 1 commit
e881e74
fc494d0
04fae12
6712a23
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
GeneralSettingsManager
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package app.k9mail.legacy.preferences | ||
|
||
fun interface GeneralSettingsChangeListener { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This could be more generic like |
||
fun onGeneralSettingsChanged() | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,7 @@ interface GeneralSettingsManager { | |
fun setMessageViewTheme(subTheme: SubTheme) | ||
fun setMessageComposeTheme(subTheme: SubTheme) | ||
fun setFixedMessageViewTheme(fixedMessageViewTheme: Boolean) | ||
|
||
fun addListener(listener: GeneralSettingsChangeListener) | ||
fun removeListener(listener: GeneralSettingsChangeListener) | ||
Comment on lines
+19
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See above, could be part of a specialized class to handle listener registration. |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would make sense to extract this into it's own class to allow reuse in feature configurations to avoid the need to always depend on
GeneralSettingsManager
when interested in change notifications.