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) {
ValidateUser user = new ValidateUser(email, password);
disposable.add(ldapService.validate(user)
// 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.fakeValidate(fakeuser)
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(this::handleResponse, this::handleError));

View File

@ -121,7 +121,7 @@ public class SharingFragment extends PreferenceFragment {
/** Sharing level list **/
locationMode.setOnPreferenceChangeListener((preference, 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(manualLocationButton);
@ -140,6 +140,8 @@ public class SharingFragment extends PreferenceFragment {
/** Custom manual location list change listener **/
manualLocationList.setOnPreferenceChangeListener((preference, newValue) -> {
ListPreference lp = (ListPreference) preference;
CharSequence [] entries = lp.getEntries();
// PrefUtils.putManualLocation(getApplicationContext(),(String) entries[Integer.parseInt((String) newValue)]);
//ToDo handle manual location change
return true;