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