mirror of https://github.com/LeOS-GSI/LeOS-Genesis
parent
5817c45cbb
commit
5c9f119cc6
|
@ -211,17 +211,22 @@ public class helpController extends AppCompatActivity {
|
|||
}
|
||||
|
||||
public void onOpenHelpExternal(View view) {
|
||||
if (!status.sSettingIsAppStarted) {
|
||||
activityContextManager.getInstance().getHomeController().onStartApplication(null);
|
||||
}
|
||||
|
||||
if (status.sTheme == enums.Theme.THEME_LIGHT || helperMethod.isDayMode(this)) {
|
||||
activityContextManager.getInstance().getHomeController().onDisableAdvert();
|
||||
if(!status.sSettingIsAppStarted){
|
||||
activityContextManager.getInstance().getHomeController().onStartApplicationNoTorHelp(constants.CONST_GENESIS_HELP_URL_CACHE);
|
||||
}else {
|
||||
activityContextManager.getInstance().getHomeController().onLoadURL(constants.CONST_GENESIS_HELP_URL_CACHE);
|
||||
}
|
||||
} else {
|
||||
activityContextManager.getInstance().getHomeController().onDisableAdvert();
|
||||
if(!status.sSettingIsAppStarted){
|
||||
activityContextManager.getInstance().getHomeController().onStartApplicationNoTorHelp(constants.CONST_GENESIS_HELP_URL_CACHE_DARK);
|
||||
}else {
|
||||
activityContextManager.getInstance().getHomeController().onLoadURL(constants.CONST_GENESIS_HELP_URL_CACHE_DARK);
|
||||
}
|
||||
}
|
||||
finish();
|
||||
activityContextManager.getInstance().onGoHome();
|
||||
}
|
||||
|
|
|
@ -36,11 +36,8 @@ public class historyDelegate implements GeckoSession.HistoryDelegate {
|
|||
|
||||
@UiThread
|
||||
public void onHistoryStateChange(@NonNull GeckoSession var1, @NonNull GeckoSession.HistoryDelegate.HistoryList var2) {
|
||||
if(mHistory==null || mHistory.size()!=var2.size()){
|
||||
mGeckoDataModel.mTheme = null;
|
||||
}
|
||||
if(mHistory !=null && mHistory.size()!=var2.size()){
|
||||
mHistory = var2;
|
||||
if(mHistory !=null){
|
||||
setURL(mHistory.get(mHistory.getCurrentIndex()).getUri());
|
||||
mEvent.invokeObserver(Arrays.asList(mHistory, mGeckoDataModel.mSessionID), homeEnums.eGeckoCallback.ON_URL_LOAD);
|
||||
if(mCurrentIndex != var2.getCurrentIndex()){
|
||||
|
@ -50,6 +47,8 @@ public class historyDelegate implements GeckoSession.HistoryDelegate {
|
|||
if (mID != null) {
|
||||
mGeckoDataModel.mCurrentURL_ID = (int) mID;
|
||||
}
|
||||
}else {
|
||||
mHistory = var2;
|
||||
}
|
||||
mCurrentIndex = var2.getCurrentIndex();
|
||||
}
|
||||
|
|
|
@ -68,6 +68,7 @@ public class progressDelegate implements GeckoSession.ProgressDelegate {
|
|||
|
||||
@Override
|
||||
public void onPageStart(@NonNull GeckoSession var1, @NonNull String var2) {
|
||||
mGeckoDataModel.mTheme = null;
|
||||
mEvent.invokeObserver(Arrays.asList(5, mGeckoDataModel.mSessionID), homeEnums.eGeckoCallback.PROGRESS_UPDATE_FORCED);
|
||||
mEvent.invokeObserver(Arrays.asList(var2, mGeckoDataModel.mSessionID, var2, mGeckoDataModel.mCurrentURL_ID, mGeckoDataModel.mTheme, null), homeEnums.eGeckoCallback.ON_UPDATE_SEARCH_BAR);
|
||||
if (mIsLoaded) {
|
||||
|
|
|
@ -227,6 +227,7 @@ public class geckoClients {
|
|||
mSession.getSettings().setAllowJavascript(status.sSettingJavaStatus);
|
||||
mSession.loadUri(url);
|
||||
}
|
||||
mSession.initURL(url);
|
||||
}
|
||||
|
||||
public void initHomeTheme() {
|
||||
|
|
|
@ -1122,7 +1122,6 @@ public class homeViewController {
|
|||
|
||||
void onUpdateSearchBar(String url, boolean showProtocol, boolean pClearText, boolean pBypassFocus) {
|
||||
|
||||
|
||||
if (url.endsWith("genesisconfigurenewidentity.com/")) {
|
||||
return;
|
||||
}
|
||||
|
@ -1355,8 +1354,10 @@ public class homeViewController {
|
|||
url = url.replace("https://", "");
|
||||
url = url.replace("http://", "");
|
||||
}
|
||||
|
||||
resource://android/assets/help/help.html
|
||||
url = url.replace("167.86.99.31", "orion.onion");
|
||||
url = url.replace("resource://android/assets/help/help.html", "orion.help");
|
||||
url = url.replace("resource://android/assets/help/help-dark.html", "orion.help");
|
||||
boolean isTextSelected = false;
|
||||
|
||||
if (mSearchbar.isSelected()) {
|
||||
|
|
|
@ -896,7 +896,7 @@ public class helperMethod {
|
|||
int millis = now.get(Calendar.MILLISECOND);
|
||||
|
||||
System.out.printf("%d-%02d-%02d %02d:%02d:%02d.%03d", year, month, day, hour, minute, second, millis);
|
||||
return month + "/" + year + " | " + hour + ":" + minute + ":" + second;
|
||||
return day + "/" + month + "/" + year + " | " + hour + ":" + minute + ":" + second;
|
||||
}
|
||||
|
||||
public static PopupWindow onCreateMenu(View p_view, int p_layout, String pSettingLanguageRegion) {
|
||||
|
|
Loading…
Reference in New Issue