added confirm dialog
This commit is contained in:
parent
31b53ac89a
commit
901684a54f
|
@ -238,11 +238,6 @@ public class UserProfile extends AppCompatActivity implements OnClickListener,
|
|||
}
|
||||
break;
|
||||
|
||||
case R.id.profile_mute:
|
||||
profileAsync = new ProfileLoader(this, ProfileLoader.Mode.ACTION_MUTE);
|
||||
profileAsync.execute(userId);
|
||||
break;
|
||||
|
||||
case R.id.profile_settings:
|
||||
Intent editProfile = new Intent(this, ProfileEdit.class);
|
||||
startActivityForResult(editProfile, REQUEST_PROFILE_CHANGED);
|
||||
|
@ -266,6 +261,24 @@ public class UserProfile extends AppCompatActivity implements OnClickListener,
|
|||
}
|
||||
break;
|
||||
|
||||
case R.id.profile_mute:
|
||||
if (properties != null) {
|
||||
profileAsync = new ProfileLoader(this, ProfileLoader.Mode.ACTION_MUTE);
|
||||
if (properties.isMuted()) {
|
||||
profileAsync.execute(userId);
|
||||
} else {
|
||||
new Builder(this).setMessage(R.string.confirm_mute)
|
||||
.setNegativeButton(R.string.no_confirm, null)
|
||||
.setPositiveButton(R.string.yes_confirm, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
profileAsync.execute(userId);
|
||||
}
|
||||
}).show();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case R.id.profile_block:
|
||||
if (properties != null) {
|
||||
profileAsync = new ProfileLoader(this, ProfileLoader.Mode.ACTION_BLOCK);
|
||||
|
|
|
@ -118,4 +118,5 @@
|
|||
<string name="failed_open_link">Fehler beim Öffnen des links!</string>
|
||||
<string name="image_download_fail">Bild konnte nicht geladen werden!</string>
|
||||
<string name="error_cant_send_to_user">Direktnachricht konnte nicht an diesen Nutzer gesendet werden!</string>
|
||||
<string name="confirm_mute">User stummschalten?</string>
|
||||
</resources>
|
|
@ -119,4 +119,5 @@
|
|||
<string name="image_download_fail">Image could not be loaded!</string>
|
||||
<string name="error_cant_send_to_user">Cannot send directmessage to this user!</string>
|
||||
<string name="information_link" translatable="false">https://github.com/nuclearfog/Shitter</string>
|
||||
<string name="confirm_mute">mute user?</string>
|
||||
</resources>
|
Loading…
Reference in New Issue