mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2025-02-08 15:10:07 +00:00
Functionality to rename playlist name from playlist interface
This commit is contained in:
parent
8df935f5fe
commit
e1a6b69f9a
@ -72,7 +72,6 @@ public class LocalPlaylistFragment extends BaseLocalListFragment<List<PlaylistSt
|
|||||||
// Save the list 10 seconds after the last change occurred
|
// Save the list 10 seconds after the last change occurred
|
||||||
private static final long SAVE_DEBOUNCE_MILLIS = 10000;
|
private static final long SAVE_DEBOUNCE_MILLIS = 10000;
|
||||||
private static final int MINIMUM_INITIAL_DRAG_VELOCITY = 12;
|
private static final int MINIMUM_INITIAL_DRAG_VELOCITY = 12;
|
||||||
|
|
||||||
@State
|
@State
|
||||||
protected Long playlistId;
|
protected Long playlistId;
|
||||||
@State
|
@State
|
||||||
@ -340,7 +339,8 @@ public class LocalPlaylistFragment extends BaseLocalListFragment<List<PlaylistSt
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onComplete() { }
|
public void onComplete() {
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -361,6 +361,8 @@ public class LocalPlaylistFragment extends BaseLocalListFragment<List<PlaylistSt
|
|||||||
.create()
|
.create()
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
|
} else if (item.getItemId() == R.id.menu_item_rename_playlist) {
|
||||||
|
createRenameDialog();
|
||||||
} else {
|
} else {
|
||||||
return super.onOptionsItemSelected(item);
|
return super.onOptionsItemSelected(item);
|
||||||
}
|
}
|
||||||
@ -420,7 +422,7 @@ public class LocalPlaylistFragment extends BaseLocalListFragment<List<PlaylistSt
|
|||||||
playlistItem.getStreamId());
|
playlistItem.getStreamId());
|
||||||
|
|
||||||
final boolean hasState = streamStatesIter.next() != null;
|
final boolean hasState = streamStatesIter.next() != null;
|
||||||
if (indexInHistory < 0 || hasState) {
|
if (indexInHistory < 0 || hasState) {
|
||||||
notWatchedItems.add(playlistItem);
|
notWatchedItems.add(playlistItem);
|
||||||
} else if (!thumbnailVideoRemoved
|
} else if (!thumbnailVideoRemoved
|
||||||
&& playlistManager.getPlaylistThumbnail(playlistId)
|
&& playlistManager.getPlaylistThumbnail(playlistId)
|
||||||
@ -722,7 +724,8 @@ public class LocalPlaylistFragment extends BaseLocalListFragment<List<PlaylistSt
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSwiped(@NonNull final RecyclerView.ViewHolder viewHolder,
|
public void onSwiped(@NonNull final RecyclerView.ViewHolder viewHolder,
|
||||||
final int swipeDir) { }
|
final int swipeDir) {
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -755,7 +758,7 @@ public class LocalPlaylistFragment extends BaseLocalListFragment<List<PlaylistSt
|
|||||||
StreamDialogEntry.append_playlist,
|
StreamDialogEntry.append_playlist,
|
||||||
StreamDialogEntry.share
|
StreamDialogEntry.share
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
entries.addAll(Arrays.asList(
|
entries.addAll(Arrays.asList(
|
||||||
StreamDialogEntry.start_here_on_background,
|
StreamDialogEntry.start_here_on_background,
|
||||||
StreamDialogEntry.start_here_on_popup,
|
StreamDialogEntry.start_here_on_popup,
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
|
<item
|
||||||
|
android:id="@+id/menu_item_rename_playlist"
|
||||||
|
android:title="@string/rename_playlist"
|
||||||
|
app:showAsAction="never" />
|
||||||
<item
|
<item
|
||||||
android:id="@+id/menu_item_remove_watched"
|
android:id="@+id/menu_item_remove_watched"
|
||||||
android:title="@string/remove_watched"
|
android:title="@string/remove_watched"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user