fixed == to equals in sharfrag switched to fakevalidate

This commit is contained in:
marcin.jedynski 2018-11-26 10:53:46 +01:00
parent fca6cd936c
commit 144d11528e
2 changed files with 7 additions and 4 deletions

View File

@ -153,9 +153,10 @@ public class LoginActivity extends AppCompatActivity {
private void loginProcess(String email, String password) { private void loginProcess(String email, String password) {
ValidateUser user = new ValidateUser(email, password); // ValidateUser user = new ValidateUser(email, password);
LdapUser fakeuser = new LdapUser(email,password,"wmi","tutor","szalonoki","moody",email);
disposable.add(ldapService.validate(user) // disposable.add(ldapService.validate(user)
disposable.add(ldapService.fakeValidate(fakeuser)
.subscribeOn(Schedulers.io()) .subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread()) .observeOn(AndroidSchedulers.mainThread())
.subscribe(this::handleResponse, this::handleError)); .subscribe(this::handleResponse, this::handleError));

View File

@ -121,7 +121,7 @@ public class SharingFragment extends PreferenceFragment {
/** Sharing level list **/ /** Sharing level list **/
locationMode.setOnPreferenceChangeListener((preference, newValue) -> { locationMode.setOnPreferenceChangeListener((preference, newValue) -> {
PrefUtils.storeLocationMode(getApplicationContext(),locationLevelMapping.get(Integer.parseInt((String) newValue))); PrefUtils.storeLocationMode(getApplicationContext(),locationLevelMapping.get(Integer.parseInt((String) newValue)));
if(PrefUtils.getLocationLevel(getApplicationContext()) == "manual"){ if(PrefUtils.getLocationLevel(getApplicationContext()).equals("manual") ){
preferenceCategory.addPreference(manualLocationList); preferenceCategory.addPreference(manualLocationList);
preferenceCategory.addPreference(manualLocationButton); preferenceCategory.addPreference(manualLocationButton);
@ -140,6 +140,8 @@ public class SharingFragment extends PreferenceFragment {
/** Custom manual location list change listener **/ /** Custom manual location list change listener **/
manualLocationList.setOnPreferenceChangeListener((preference, newValue) -> { manualLocationList.setOnPreferenceChangeListener((preference, newValue) -> {
ListPreference lp = (ListPreference) preference; ListPreference lp = (ListPreference) preference;
CharSequence [] entries = lp.getEntries();
// PrefUtils.putManualLocation(getApplicationContext(),(String) entries[Integer.parseInt((String) newValue)]);
//ToDo handle manual location change //ToDo handle manual location change
return true; return true;