Bug Fixes

Bug Fixes
master
Abdul Mannan Saeed 2023-02-19 15:32:46 +05:00
parent 5817c45cbb
commit 5c9f119cc6
6 changed files with 20 additions and 13 deletions

View File

@ -211,16 +211,21 @@ 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();
activityContextManager.getInstance().getHomeController().onLoadURL(constants.CONST_GENESIS_HELP_URL_CACHE);
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();
activityContextManager.getInstance().getHomeController().onLoadURL(constants.CONST_GENESIS_HELP_URL_CACHE_DARK);
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();

View File

@ -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;
}
mHistory = var2;
if(mHistory !=null){
if(mHistory !=null && mHistory.size()!=var2.size()){
mHistory = var2;
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();
}

View File

@ -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) {

View File

@ -227,6 +227,7 @@ public class geckoClients {
mSession.getSettings().setAllowJavascript(status.sSettingJavaStatus);
mSession.loadUri(url);
}
mSession.initURL(url);
}
public void initHomeTheme() {

View File

@ -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()) {

View File

@ -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) {