From 505e890f8b2eef62d5ffae2ac0a773220f207861 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mieszko=20Wrzeszczy=C5=84ski?= Date: Wed, 7 Nov 2018 08:45:09 +0100 Subject: [PATCH] Add custom status & change userName --- .../java/com/uam/wmi/findmytutor/activity/LoginActivity.java | 2 +- .../java/com/uam/wmi/findmytutor/activity/MapActivity.java | 1 - .../com/uam/wmi/findmytutor/activity/SharingFragment.java | 4 ++++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/uam/wmi/findmytutor/activity/LoginActivity.java b/app/src/main/java/com/uam/wmi/findmytutor/activity/LoginActivity.java index b1e8770..53eb050 100644 --- a/app/src/main/java/com/uam/wmi/findmytutor/activity/LoginActivity.java +++ b/app/src/main/java/com/uam/wmi/findmytutor/activity/LoginActivity.java @@ -161,7 +161,7 @@ public class LoginActivity extends AppCompatActivity { Log.e("LOGIN", String.valueOf(PrefUtils.getIsTutor(getApplicationContext()))); //Fake validate - LdapUser user = new LdapUser(email, password, "admin", (PrefUtils.getIsTutor(getApplicationContext())) ? "Tutor" : "Student", "string", "string", email); + LdapUser user = new LdapUser(email, password, "admin", (PrefUtils.getIsTutor(getApplicationContext())) ? "Tutor" : "Student", "ImiÄ™", "Nazwisko", email); // ValidateUser user = new ValidateUser(email, password); diff --git a/app/src/main/java/com/uam/wmi/findmytutor/activity/MapActivity.java b/app/src/main/java/com/uam/wmi/findmytutor/activity/MapActivity.java index e293124..897e97e 100644 --- a/app/src/main/java/com/uam/wmi/findmytutor/activity/MapActivity.java +++ b/app/src/main/java/com/uam/wmi/findmytutor/activity/MapActivity.java @@ -209,7 +209,6 @@ public class MapActivity extends BaseActivity Toast.makeText(MapActivity.this, message, Toast.LENGTH_SHORT).show(); } - private void setOnMapLongClickListener() { final boolean[] cancel = {false}; diff --git a/app/src/main/java/com/uam/wmi/findmytutor/activity/SharingFragment.java b/app/src/main/java/com/uam/wmi/findmytutor/activity/SharingFragment.java index f8adab8..839f673 100644 --- a/app/src/main/java/com/uam/wmi/findmytutor/activity/SharingFragment.java +++ b/app/src/main/java/com/uam/wmi/findmytutor/activity/SharingFragment.java @@ -54,13 +54,17 @@ public class SharingFragment extends PreferenceFragment { manualStatus.setOnPreferenceChangeListener((preference, newValue) -> { ListPreference lp = (ListPreference) findPreference("key_status_value"); updateListPreference(lp, newValue, "manual_statuses"); + PrefUtils.storeStatus(getApplicationContext(),(String) newValue); + return true; }); + locationMode.setOnPreferenceChangeListener((preference, newValue) -> { ListPreference lp = (ListPreference) preference; PrefUtils.storeLocationMode(getApplicationContext(),locationLevelMapping.get(Integer.parseInt((String) newValue))); return true; }); + statusList.setOnPreferenceChangeListener((preference, newValue) -> { ListPreference lp = (ListPreference) preference; CharSequence [] entries = lp.getEntries(); -- 2.20.1