-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DROID-3217 Space-level chat | Enhancement | Screen with message react…
…ion and corresponding members (#1970)
- Loading branch information
Showing
16 changed files
with
827 additions
and
210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
app/src/main/java/com/anytypeio/anytype/di/feature/discussions/SelectChatReactionDI.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
package com.anytypeio.anytype.di.feature.discussions | ||
|
||
import androidx.lifecycle.ViewModelProvider | ||
import com.anytypeio.anytype.core_utils.di.scope.PerScreen | ||
import com.anytypeio.anytype.di.common.ComponentDependencies | ||
import com.anytypeio.anytype.domain.auth.repo.AuthRepository | ||
import com.anytypeio.anytype.domain.base.AppCoroutineDispatchers | ||
import com.anytypeio.anytype.domain.block.repo.BlockRepository | ||
import com.anytypeio.anytype.domain.config.UserSettingsRepository | ||
import com.anytypeio.anytype.emojifier.data.Emoji | ||
import com.anytypeio.anytype.emojifier.data.EmojiProvider | ||
import com.anytypeio.anytype.emojifier.suggest.EmojiSuggester | ||
import com.anytypeio.anytype.feature_discussions.presentation.SelectChatReactionViewModel | ||
import com.anytypeio.anytype.ui.chats.SelectChatReactionFragment | ||
import dagger.Binds | ||
import dagger.BindsInstance | ||
import dagger.Component | ||
import dagger.Module | ||
import dagger.Provides | ||
|
||
@Component( | ||
dependencies = [SelectChatReactionDependencies::class], | ||
modules = [ | ||
SelectChatReactionModule::class, | ||
SelectChatReactionModule.Declarations::class | ||
] | ||
) | ||
@PerScreen | ||
interface SelectChatReactionComponent { | ||
@Component.Builder | ||
interface Builder { | ||
@BindsInstance | ||
fun withParams(params: SelectChatReactionViewModel.Params): Builder | ||
fun withDependencies(dependencies: SelectChatReactionDependencies): Builder | ||
fun build(): SelectChatReactionComponent | ||
} | ||
|
||
fun getViewModel(): SelectChatReactionViewModel | ||
fun inject(fragment: SelectChatReactionFragment) | ||
} | ||
|
||
@Module | ||
object SelectChatReactionModule { | ||
@Provides | ||
@PerScreen | ||
@JvmStatic | ||
fun provideEmojiProvider(): EmojiProvider = Emoji | ||
|
||
@Module | ||
interface Declarations { | ||
@PerScreen | ||
@Binds | ||
fun bindViewModelFactory( | ||
factory: SelectChatReactionViewModel.Factory | ||
): ViewModelProvider.Factory | ||
} | ||
} | ||
|
||
interface SelectChatReactionDependencies : ComponentDependencies { | ||
fun dispatchers(): AppCoroutineDispatchers | ||
fun suggester(): EmojiSuggester | ||
fun repo(): BlockRepository | ||
fun auth(): AuthRepository | ||
fun prefs(): UserSettingsRepository | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.