mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-21 19:41:38 -04:00
Use Alert Dialog Shower
This commit is contained in:
parent
1fd7ae8f7e
commit
fc4ba04544
2
.gitignore
vendored
2
.gitignore
vendored
@ -66,4 +66,4 @@ captures/
|
||||
!/.idea/encodings.xml
|
||||
!/.idea/copyright/
|
||||
!/.idea/compiler.xml
|
||||
app/libs
|
||||
|
||||
|
@ -50,7 +50,7 @@ sealed class KiwixDialog(
|
||||
R.string.hotspot_failed_message,
|
||||
R.string.go_to_wifi_settings_label,
|
||||
R.string.cancel
|
||||
);
|
||||
)
|
||||
|
||||
data class FileTransferConfirmation(override val args: Array<out Any>) : KiwixDialog(
|
||||
null, R.string.transfer_to, R.string.yes, android.R.string.cancel
|
||||
|
@ -38,7 +38,6 @@ import com.google.android.gms.location.LocationSettingsResponse;
|
||||
import com.google.android.gms.location.LocationSettingsStates;
|
||||
import com.google.android.gms.location.LocationSettingsStatusCodes;
|
||||
import com.google.android.gms.tasks.Task;
|
||||
import dagger.android.AndroidInjection;
|
||||
import java.io.File;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
@ -99,8 +98,6 @@ public class ZimHostActivity extends BaseActivity implements
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_zim_host);
|
||||
|
||||
AndroidInjection.inject(this);
|
||||
|
||||
setUpToolbar();
|
||||
|
||||
if (savedInstanceState != null) {
|
||||
|
@ -1,10 +1,9 @@
|
||||
package org.kiwix.kiwixmobile.webserver;
|
||||
|
||||
import android.app.Activity;
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
import javax.inject.Singleton;
|
||||
import org.kiwix.kiwixmobile.di.PerActivity;
|
||||
import org.kiwix.kiwixmobile.utils.AlertDialogShower;
|
||||
|
||||
@Module
|
||||
public class ZimHostModule {
|
||||
@ -15,9 +14,8 @@ public class ZimHostModule {
|
||||
return zimHostPresenter;
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Singleton AlertDialogShower provideAlertDialogShower(AlertDialogShower alertDialogShower) {
|
||||
return alertDialogShower;
|
||||
@Provides Activity providesActivity(ZimHostActivity zimActivity) {
|
||||
return (Activity) zimActivity;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user