Add buttons for removing statuses/locations in sharing tab #122

Merged
s416204 merged 75 commits from addRemovingManuals into develop 2019-01-05 00:45:41 +01:00
5 changed files with 8 additions and 7 deletions
Showing only changes of commit 3a6f20d12e - Show all commits

View File

@ -168,8 +168,6 @@ public class BlackList extends AppCompatActivity {
@Override
public void onSuccess(User user) {
blacklistedUsers.add(user);
Snackbar.make(getWindow().getDecorView().getRootView(), "user fetch OK! success", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
toggleEmptyNotes();
if (blacklistedUsers.size() == blacklistedUsersIDs.size()) {
mAdapter.notifyDataSetChanged();
@ -244,6 +242,9 @@ public class BlackList extends AppCompatActivity {
if (e instanceof HttpException) {
ResponseBody responseBody = ((HttpException) e).response().errorBody();
message = RestApiHelper.getErrorMessage(responseBody);
if (((HttpException) e).response().code() == 404) {
message = getString(R.string.no_such_a_user);
}
} else {
message = "Network Error !";
}

View File

@ -199,7 +199,6 @@ public class MapActivity extends BaseActivity
private void createMarkerModalView(User user) {
String cordStatus = coordsMap.get(user.getId()).getLabel();
String sharingLevel = coordsMap.get(user.getId()).getDisplayMode();
user.statu
LayoutInflater layoutInflaterAndroid = LayoutInflater.from(getApplicationContext());
@SuppressLint("InflateParams") View view = layoutInflaterAndroid.inflate(R.layout.marker_modal, null);

View File

@ -155,8 +155,6 @@ public class WhiteList extends AppCompatActivity {
@Override
public void onSuccess(User user) {
whitelistedUsers.add(user);
Snackbar.make(getWindow().getDecorView().getRootView(), "user fetch OK! success", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
toggleEmptyNotes();
if (whitelistedUsers.size() == whitelistedUsersIDs.size()) {
mAdapter.notifyDataSetChanged();
@ -231,11 +229,12 @@ public class WhiteList extends AppCompatActivity {
if (e instanceof HttpException) {
ResponseBody responseBody = ((HttpException) e).response().errorBody();
message = RestApiHelper.getErrorMessage(responseBody);
if (((HttpException) e).response().code() == 404) {
message = getString(R.string.no_such_a_user);
}
} else {
message = "Network Error !";
}
Toast.makeText(getApplicationContext(), e.toString(), Toast.LENGTH_SHORT).show();
Snackbar.make(getWindow().getDecorView().getRootView(), message, Snackbar.LENGTH_LONG)
.setAction("Action", null).show();

View File

@ -260,6 +260,7 @@
<string name="activity_title_whitelist">Biała lista</string>
<string name="title_activity_white_list">Biała lista</string>
<string name="white_list_title">Dodaj użytkownika do białej listy</string>
<string name="no_such_a_user">Nie ma takiego użytkownika</string>
</resources>

View File

@ -427,5 +427,6 @@
<string name="no_online_users">Currently, there are no\nonline users.</string>
<string name="no_offline_users">Currently, there are no\noffline users.</string>
<string name="only_online_users">Only online users</string>
<string name="no_such_a_user">No such a user</string>
</resources>