Skip to content

Commit 151f5c7

Browse files
committed
feat: add CandidateModule to encapsulate different candidate module
1 parent 80d0e03 commit 151f5c7

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* SPDX-FileCopyrightText: 2015 - 2025 Rime community
3+
* SPDX-License-Identifier: GPL-3.0-or-later
4+
*/
5+
6+
package com.osfans.trime.ime.candidates
7+
8+
import android.content.Context
9+
import com.osfans.trime.daemon.RimeSession
10+
import com.osfans.trime.data.theme.Theme
11+
import com.osfans.trime.ime.bar.QuickBar
12+
import com.osfans.trime.ime.candidates.compact.CompactCandidateModule
13+
import com.osfans.trime.ime.candidates.suggestion.SuggestionCandidateModule
14+
import com.osfans.trime.ime.core.TrimeInputMethodService
15+
import com.osfans.trime.ime.dependency.InputScope
16+
import me.tatarka.inject.annotations.Inject
17+
18+
@InputScope
19+
@Inject
20+
class CandidateModule(
21+
val context: Context,
22+
val service: TrimeInputMethodService,
23+
val rime: RimeSession,
24+
val theme: Theme,
25+
val bar: QuickBar,
26+
) {
27+
val compactCandidateModule = CompactCandidateModule(context, service, rime, theme, bar)
28+
val suggestionCandidateModule = SuggestionCandidateModule(context, service, rime, theme, bar)
29+
}

0 commit comments

Comments
 (0)