mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-24 05:04:50 -04:00
Refactor Toasts in HotspotService
This commit is contained in:
parent
301368ecbd
commit
0fe29eff35
@ -95,14 +95,14 @@ public class HotspotService extends Service {
|
||||
case ACTION_START_SERVER:
|
||||
if (!webServerHelper.startServerHelper(zimHostCallbacks,
|
||||
intent.getStringArrayListExtra(SELECTED_ZIM_PATHS_KEY))) {
|
||||
Toast.makeText(this, R.string.server_failed_toast_message, Toast.LENGTH_LONG).show();
|
||||
Toast.makeText(this, R.string.server_failed_toast_message, Toast.LENGTH_SHORT).show();
|
||||
} else {
|
||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
|
||||
startForeground(HOTSPOT_NOTIFICATION_ID,
|
||||
buildForegroundNotification(getString(R.string.hotspot_running)));
|
||||
}
|
||||
Toast.makeText(this, R.string.server_started__successfully_toast_message,
|
||||
Toast.LENGTH_LONG).show();
|
||||
Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user