Updated on 2026-08-14
This commit is contained in:
parent
35adc604f8
commit
200f2e368c
3 changed files with 28 additions and 2 deletions
21
app/src/main/java/com/tangem/di/AppModule.java
Normal file
21
app/src/main/java/com/tangem/di/AppModule.java
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
package com.tangem.di;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
@Singleton
|
||||
public class AppModule {
|
||||
private Context appContext;
|
||||
|
||||
public AppModule(@NotNull Context context) {
|
||||
appContext = context;
|
||||
}
|
||||
|
||||
Context provideContext() {
|
||||
return appContext;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,15 +1,20 @@
|
|||
package com.tangem.di;
|
||||
|
||||
import com.tangem.presentation.activity.LogoActivity;
|
||||
import com.tangem.presentation.activity.MainActivity;
|
||||
|
||||
import javax.inject.Singleton;
|
||||
|
||||
import dagger.Component;
|
||||
|
||||
@Singleton
|
||||
@Component(modules = {NavigatorModule.class})
|
||||
@Component(modules = {
|
||||
// AppModule.class,
|
||||
NavigatorModule.class})
|
||||
public interface NavigatorComponent {
|
||||
|
||||
void inject(LogoActivity activity);
|
||||
|
||||
void inject(MainActivity activity);
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue