bug fixes

master
msmannan00 2019-08-12 01:59:59 +05:00
parent 64be476170
commit c8e907efed
4 changed files with 26 additions and 18 deletions

View File

@ -4,8 +4,12 @@ import android.os.Bundle;
import android.view.View; import android.view.View;
import android.widget.Spinner; import android.widget.Spinner;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import com.darkweb.genesissearchengine.constants.status;
import com.example.myapplication.R; import com.example.myapplication.R;
import static com.darkweb.genesissearchengine.constants.status.history_status;
import static com.darkweb.genesissearchengine.constants.status.java_status;
public class setting_controller extends AppCompatActivity public class setting_controller extends AppCompatActivity
{ {
@ -28,6 +32,10 @@ public class setting_controller extends AppCompatActivity
viewsInitializations(); viewsInitializations();
listenersInitializations(); listenersInitializations();
initializeModel(); initializeModel();
setting_model.getInstance().java_status = java_status;
setting_model.getInstance().history_status = history_status;
setting_model.getInstance().search_status = status.search_status;
} }
public void viewsInitializations() public void viewsInitializations()

View File

@ -45,7 +45,6 @@ class setting_view_controller
private void initJavascript() private void initJavascript()
{ {
setting_model.getInstance().java_status = java_status;
if (java_status) if (java_status)
{ {
javascript.setSelection(0); javascript.setSelection(0);
@ -58,7 +57,6 @@ class setting_view_controller
private void initHistory() private void initHistory()
{ {
setting_model.getInstance().history_status = history_status;
if (history_status) if (history_status)
{ {
history.setSelection(0); history.setSelection(0);
@ -73,7 +71,6 @@ class setting_view_controller
private void initSearchEngine() private void initSearchEngine()
{ {
String myString = preference_manager.getInstance().getString(keys.search_engine, strings.darkweb); String myString = preference_manager.getInstance().getString(keys.search_engine, strings.darkweb);
setting_model.getInstance().search_status = myString;
ArrayAdapter myAdap = (ArrayAdapter) search.getAdapter(); ArrayAdapter myAdap = (ArrayAdapter) search.getAdapter();
int spinnerPosition = myAdap.getPosition(myString); int spinnerPosition = myAdap.getPosition(myString);
@ -91,15 +88,18 @@ class setting_view_controller
home_model.getInstance().getHomeInstance().initSearchEngine(); home_model.getInstance().getHomeInstance().initSearchEngine();
preference_manager.getInstance().setString(keys.search_engine, setting_model.getInstance().search_status); preference_manager.getInstance().setString(keys.search_engine, setting_model.getInstance().search_status);
} }
else if(status.java_status != setting_model.getInstance().java_status) if(status.java_status != setting_model.getInstance().java_status)
{ {
status.java_status = setting_model.getInstance().java_status; status.java_status = setting_model.getInstance().java_status;
home_model.getInstance().getHomeInstance().onReInitGeckoView(); home_model.getInstance().getHomeInstance().onReInitGeckoView();
preference_manager.getInstance().setBool(keys.java_script, status.java_status); preference_manager.getInstance().setBool(keys.java_script, status.java_status);
} }
if(status.history_status != setting_model.getInstance().history_status)
{
status.history_status = setting_model.getInstance().history_status; status.history_status = setting_model.getInstance().history_status;
preference_manager.getInstance().setBool(keys.history_clear, status.history_status); preference_manager.getInstance().setBool(keys.history_clear, status.history_status);
}
setting_model.getInstance().getSettingInstance().finish(); setting_model.getInstance().getSettingInstance().finish();
} }

View File

@ -26,11 +26,11 @@ public class settings_ehandler
private void onJavaScriptListener(int position) private void onJavaScriptListener(int position)
{ {
if(position==0 && setting_model.getInstance().java_status) if(position==1 && setting_model.getInstance().java_status)
{ {
setting_model.getInstance().java_status = false; setting_model.getInstance().java_status = false;
} }
else if(!setting_model.getInstance().java_status) else if(position==0 && !setting_model.getInstance().java_status)
{ {
setting_model.getInstance().java_status = true; setting_model.getInstance().java_status = true;
} }
@ -46,11 +46,11 @@ public class settings_ehandler
private void onHistoryListener(int position) private void onHistoryListener(int position)
{ {
if(position==0 && setting_model.getInstance().history_status) if(position==1 && setting_model.getInstance().history_status)
{ {
setting_model.getInstance().history_status = false; setting_model.getInstance().history_status = false;
} }
else if(!setting_model.getInstance().history_status) else if(position==0 && !setting_model.getInstance().history_status)
{ {
setting_model.getInstance().history_status = true; setting_model.getInstance().history_status = true;
} }

View File

@ -1,18 +1,18 @@
/*arm versions*/ /*arm versions*/
project.ext.arm_vname = '200' project.ext.arm_vname = '205'
project.ext.arm_vcode = 200 project.ext.arm_vcode = 205
/*aarch versions*/ /*aarch versions*/
project.ext.aarch_vname = '201' project.ext.aarch_vname = '206'
project.ext.aarch_vcode = 201 project.ext.aarch_vcode = 206
/*x86 versions*/ /*x86 versions*/
project.ext.x86_vname = '202' project.ext.x86_vname = '207'
project.ext.x86_vcode = 202 project.ext.x86_vcode = 207
/*x64 versions*/ /*x64 versions*/
project.ext.x64_vname = '203' project.ext.x64_vname = '208'
project.ext.x64_vcode = 203 project.ext.x64_vcode = 208
/*dimension*/ /*dimension*/
project.ext.dimen = 'abi' project.ext.dimen = 'abi'