mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-08 06:42:21 -04:00
On clicking menu item icon new tab is open. #995
This commit is contained in:
parent
62d7b3248b
commit
ec97df3ae6
@ -36,6 +36,7 @@ import android.net.Uri;
|
|||||||
import android.os.Build;
|
import android.os.Build;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.CountDownTimer;
|
import android.os.CountDownTimer;
|
||||||
|
import android.os.Handler;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.text.SpannableString;
|
import android.text.SpannableString;
|
||||||
import android.text.style.ForegroundColorSpan;
|
import android.text.style.ForegroundColorSpan;
|
||||||
@ -776,6 +777,11 @@ public class MainActivity extends BaseActivity implements WebViewCallback,
|
|||||||
updateTabSwitcherIcon();
|
updateTabSwitcherIcon();
|
||||||
})
|
})
|
||||||
.show();
|
.show();
|
||||||
|
new Handler().postDelayed(() -> {
|
||||||
|
if (webViewList.size() == 0) {
|
||||||
|
newTab(HOME_URL);
|
||||||
|
}
|
||||||
|
}, 1500);
|
||||||
updateTabSwitcherIcon();
|
updateTabSwitcherIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1146,6 +1152,11 @@ public class MainActivity extends BaseActivity implements WebViewCallback,
|
|||||||
void closeAllTabs() {
|
void closeAllTabs() {
|
||||||
webViewList.clear();
|
webViewList.clear();
|
||||||
tabsAdapter.notifyDataSetChanged();
|
tabsAdapter.notifyDataSetChanged();
|
||||||
|
new Handler().postDelayed(() -> {
|
||||||
|
if (webViewList.size() == 0) {
|
||||||
|
newTab(HOME_URL);
|
||||||
|
}
|
||||||
|
}, 1500);
|
||||||
updateTabSwitcherIcon();
|
updateTabSwitcherIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user