mirror of
https://github.com/gabehf/tempus.git
synced 2026-03-18 03:36:28 -07:00
fix: error handling
This commit is contained in:
parent
24747207b8
commit
72bd71dea2
5 changed files with 19 additions and 4 deletions
|
|
@ -39,6 +39,7 @@ import com.cappielloantonio.tempo.util.Preferences;
|
|||
import com.cappielloantonio.tempo.viewmodel.AlbumBottomSheetViewModel;
|
||||
import com.cappielloantonio.tempo.viewmodel.HomeViewModel;
|
||||
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
@ -198,6 +199,9 @@ public class AlbumBottomSheetDialog extends BottomSheetDialogFragment implements
|
|||
clipboardManager.setPrimaryClip(clipData);
|
||||
refreshShares();
|
||||
dismissBottomSheet();
|
||||
} else {
|
||||
Toast.makeText(requireContext(), getString(R.string.share_unsupported_error), Toast.LENGTH_SHORT).show();
|
||||
dismissBottomSheet();
|
||||
}
|
||||
}));
|
||||
|
||||
|
|
|
|||
|
|
@ -216,6 +216,9 @@ public class SongBottomSheetDialog extends BottomSheetDialogFragment implements
|
|||
clipboardManager.setPrimaryClip(clipData);
|
||||
refreshShares();
|
||||
dismissBottomSheet();
|
||||
} else {
|
||||
Toast.makeText(requireContext(), getString(R.string.share_unsupported_error), Toast.LENGTH_SHORT).show();
|
||||
dismissBottomSheet();
|
||||
}
|
||||
}));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue