Skip to content

Commit

Permalink
feat: add CandidateModule to encapsulate different candidate module
Browse files Browse the repository at this point in the history
  • Loading branch information
goofyz committed Jan 14, 2025
1 parent 80d0e03 commit 151f5c7
Showing 1 changed file with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* SPDX-FileCopyrightText: 2015 - 2025 Rime community
* SPDX-License-Identifier: GPL-3.0-or-later
*/

package com.osfans.trime.ime.candidates

import android.content.Context
import com.osfans.trime.daemon.RimeSession
import com.osfans.trime.data.theme.Theme
import com.osfans.trime.ime.bar.QuickBar
import com.osfans.trime.ime.candidates.compact.CompactCandidateModule
import com.osfans.trime.ime.candidates.suggestion.SuggestionCandidateModule
import com.osfans.trime.ime.core.TrimeInputMethodService
import com.osfans.trime.ime.dependency.InputScope
import me.tatarka.inject.annotations.Inject

@InputScope
@Inject
class CandidateModule(
val context: Context,
val service: TrimeInputMethodService,
val rime: RimeSession,
val theme: Theme,
val bar: QuickBar,
) {
val compactCandidateModule = CompactCandidateModule(context, service, rime, theme, bar)
val suggestionCandidateModule = SuggestionCandidateModule(context, service, rime, theme, bar)
}

0 comments on commit 151f5c7

Please sign in to comment.