TunnelEditor: Add toast messages to success events
Letting the user know that the operation went successfully via visual cues is a nice UX touch. Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
5ed36d7346
commit
fd571c53ce
@ -20,6 +20,7 @@ import android.view.MenuItem;
|
|||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.view.inputmethod.InputMethodManager;
|
import android.view.inputmethod.InputMethodManager;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
import com.wireguard.android.Application;
|
import com.wireguard.android.Application;
|
||||||
import com.wireguard.android.R;
|
import com.wireguard.android.R;
|
||||||
@ -51,6 +52,7 @@ public class TunnelEditorFragment extends BaseFragment {
|
|||||||
if (throwable == null) {
|
if (throwable == null) {
|
||||||
message = getString(R.string.config_save_success, savedTunnel.getName());
|
message = getString(R.string.config_save_success, savedTunnel.getName());
|
||||||
Log.d(TAG, message);
|
Log.d(TAG, message);
|
||||||
|
Toast.makeText(getContext(), message, Toast.LENGTH_SHORT).show();
|
||||||
onFinished();
|
onFinished();
|
||||||
} else {
|
} else {
|
||||||
final String error = ExceptionLoggers.unwrap(throwable).getMessage();
|
final String error = ExceptionLoggers.unwrap(throwable).getMessage();
|
||||||
|
Loading…
Reference in New Issue
Block a user