Updated on 2026-08-14
This commit is contained in:
parent
c456f38210
commit
35adc604f8
8 changed files with 77 additions and 27 deletions
|
|
@ -3,7 +3,9 @@ package com.tangem;
|
|||
import android.app.Application;
|
||||
import android.support.v7.app.AppCompatDelegate;
|
||||
|
||||
import com.tangem.di.DaggerNavigatorComponent;
|
||||
import com.tangem.di.DaggerNetworkComponent;
|
||||
import com.tangem.di.NavigatorComponent;
|
||||
import com.tangem.di.NetworkComponent;
|
||||
|
||||
public class App extends Application {
|
||||
|
|
@ -22,6 +24,11 @@ public class App extends Application {
|
|||
}
|
||||
|
||||
private static NetworkComponent networkComponent;
|
||||
private static NavigatorComponent navigatorComponent;
|
||||
|
||||
public static NavigatorComponent getNavigatorComponent() {
|
||||
return navigatorComponent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
|
|
@ -30,6 +37,7 @@ public class App extends Application {
|
|||
sInstance = this;
|
||||
|
||||
networkComponent = DaggerNetworkComponent.create();
|
||||
navigatorComponent = buildNavigatorComponent();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -43,4 +51,9 @@ public class App extends Application {
|
|||
return networkComponent;
|
||||
}
|
||||
|
||||
protected NavigatorComponent buildNavigatorComponent() {
|
||||
return DaggerNavigatorComponent.builder()
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue