Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit 18f7365

Browse files
committed
feat: added handlers for listening
1 parent 4daa97f commit 18f7365

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package com.codee.core
2+
3+
import android.content.Context
4+
import com.codee.core.handlers.strings.NewStringsAppliedHandler
5+
import com.codee.core.handlers.theme.NewThemeHandler
6+
7+
/**
8+
* Application communicator to listen updates.
9+
*/
10+
interface ApplicationProvider : NewStringsAppliedHandler, NewThemeHandler {
11+
/**
12+
* Application context.
13+
* @return [Context].
14+
*/
15+
val context: Context
16+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.codee.core.handlers.strings
2+
3+
import com.codee.plugins.api.strings.IStrings
4+
5+
interface NewStringsAppliedHandler {
6+
/**
7+
* When new `Strings` applied.
8+
* @param strings - new strings.
9+
*/
10+
fun onNewStringsApplied(strings: IStrings)
11+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package com.codee.core.handlers.theme
2+
3+
import com.codee.plugins.api.themes.ThemeColors
4+
5+
interface NewThemeHandler {
6+
/**
7+
* When theme changed.
8+
*/
9+
fun onThemeChanged(colors: ThemeColors)
10+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /