diff --git a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java index 5a4eab6e831..560ea46545a 100644 --- a/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java +++ b/app/src/main/java/org/schabi/newpipe/local/playlist/LocalPlaylistFragment.java @@ -5,7 +5,6 @@ import static org.schabi.newpipe.util.ThemeHelper.shouldUseGridLayout; import android.content.Context; -import android.content.SharedPreferences; import android.os.Bundle; import android.os.Parcelable; import android.text.InputType; @@ -23,7 +22,6 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AlertDialog; -import androidx.preference.PreferenceManager; import androidx.recyclerview.widget.ItemTouchHelper; import androidx.recyclerview.widget.RecyclerView; import androidx.viewbinding.ViewBinding; @@ -38,7 +36,6 @@ import org.schabi.newpipe.database.playlist.model.PlaylistEntity; import org.schabi.newpipe.database.stream.model.StreamEntity; import org.schabi.newpipe.databinding.DialogEditTextBinding; -import org.schabi.newpipe.databinding.DialogSharePlaylistBinding; import org.schabi.newpipe.databinding.LocalPlaylistHeaderBinding; import org.schabi.newpipe.databinding.PlaylistControlBinding; import org.schabi.newpipe.error.ErrorInfo; @@ -54,8 +51,8 @@ import org.schabi.newpipe.util.Localization; import org.schabi.newpipe.util.NavigationHelper; import org.schabi.newpipe.util.OnClickGesture; -import org.schabi.newpipe.util.external_communication.ShareUtils; import org.schabi.newpipe.util.PlayButtonHelper; +import org.schabi.newpipe.util.external_communication.ShareUtils; import java.util.ArrayList; import java.util.Collections; @@ -102,8 +99,6 @@ public class LocalPlaylistFragment extends BaseLocalListFragment Single.just(playlist.stream() .map(PlaylistStreamEntry::getStreamEntity) @@ -875,34 +867,17 @@ private void createShareConfirmationDialog() { return; } - final DialogSharePlaylistBinding dialogBinding = DialogSharePlaylistBinding - .inflate(getLayoutInflater()); - new AlertDialog.Builder(getContext()) .setTitle(R.string.share_playlist) + .setMessage(R.string.share_playlist_with_details_message) .setCancelable(true) - .setView(dialogBinding.getRoot()) .setPositiveButton(R.string.share_playlist_with_details, (dialog, which) -> { - savePreferencesAndSharePlaylist( - dialogBinding.rememberChoiceCheckBox.isChecked(), true); + sharePlaylist(/* shouldSharePlaylistDetails= */ true); }) .setNegativeButton(R.string.share_playlist_with_list, (dialog, which) -> { - savePreferencesAndSharePlaylist( - dialogBinding.rememberChoiceCheckBox.isChecked(), false); + sharePlaylist(/* shouldSharePlaylistDetails= */ false); }) .show(); } - - private void savePreferencesAndSharePlaylist(final boolean rememberPlaylistSharingOption, - final boolean sharePlaylistWithDetails) { - sharedPreferences.edit() - .putBoolean(requireContext().getString( - R.string.remember_local_playlist_sharing_option_key), - rememberPlaylistSharingOption) - .putBoolean(requireContext().getString( - R.string.share_playlist_with_details_key), sharePlaylistWithDetails) - .apply(); - sharePlaylist(); - } } diff --git a/app/src/main/res/layout/dialog_share_playlist.xml b/app/src/main/res/layout/dialog_share_playlist.xml deleted file mode 100644 index 571264e57ea..00000000000 --- a/app/src/main/res/layout/dialog_share_playlist.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - diff --git a/app/src/main/res/values/settings_keys.xml b/app/src/main/res/values/settings_keys.xml index 42c2639c226..880fa92da7b 100644 --- a/app/src/main/res/values/settings_keys.xml +++ b/app/src/main/res/values/settings_keys.xml @@ -24,8 +24,6 @@ screen_brightness_timestamp_key clear_queue_confirmation_key ignore_hardware_media_buttons_key - share_playlist_with_details_key - remember_local_playlist_sharing_option_key popup_saved_width popup_saved_x diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 317de1a92f3..d956ba5ba93 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -836,8 +836,6 @@ Share playlist with details such as playlist name and video titles or as a simple list of video URLs Share with details Share URL list - Remember my choice - Share playlist with details such as playlist name and video titles - %s: %s %s\n%s diff --git a/app/src/main/res/xml/video_audio_settings.xml b/app/src/main/res/xml/video_audio_settings.xml index 87d89594278..727ce4df40a 100644 --- a/app/src/main/res/xml/video_audio_settings.xml +++ b/app/src/main/res/xml/video_audio_settings.xml @@ -249,13 +249,5 @@ android:title="@string/ignore_hardware_media_buttons_title" app:singleLineTitle="false" app:iconSpaceReserved="false" /> - -