1313import android .view .MenuItem ;
1414import android .view .View ;
1515import android .view .ViewGroup ;
16- import android .widget .Toast ;
1716
1817import androidx .annotation .NonNull ;
1918import androidx .annotation .Nullable ;
@@ -231,13 +230,8 @@ public boolean onOptionsItemSelected(final MenuItem item) {
231230 ShareUtils .openUrlInBrowser (requireContext (), url );
232231 break ;
233232 case R .id .menu_item_share :
234- if (currentInfo != null ) {
235- ShareUtils .shareText (requireContext (), name , url ,
236- currentInfo .getThumbnailUrl ());
237- } else {
238- Toast .makeText (getContext (), getString (R .string .playlist_loading_message ),
239- Toast .LENGTH_SHORT ).show ();
240- }
233+ ShareUtils .shareText (requireContext (), name , url ,
234+ currentInfo == null ? null : currentInfo .getThumbnailUrl ());
241235 break ;
242236 case R .id .menu_item_bookmark :
243237 onBookmarkClicked ();
@@ -253,9 +247,6 @@ public boolean onOptionsItemSelected(final MenuItem item) {
253247 .collect (Collectors .toList ()),
254248 dialog -> dialog .show (getFM (), TAG )
255249 ));
256- } else {
257- Toast .makeText (getContext (), getString (R .string .playlist_loading_message ),
258- Toast .LENGTH_SHORT ).show ();
259250 }
260251 break ;
261252 default :
0 commit comments