fixed playlist rename bug
This commit is contained in:
parent
210feb7aec
commit
45df5596b8
2 changed files with 49 additions and 49 deletions
|
@ -40,5 +40,5 @@ public class Constants {
|
||||||
public static final String APP_INSTAGRAM_LINK = "https://www.instagram.com/retromusicapp/";
|
public static final String APP_INSTAGRAM_LINK = "https://www.instagram.com/retromusicapp/";
|
||||||
public static final String APP_TELEGRAM_LINK = "https://t.me/retromusicapp/";
|
public static final String APP_TELEGRAM_LINK = "https://t.me/retromusicapp/";
|
||||||
public static final String APP_TWITTER_LINK = "https://twitter.com/retromusicapp";
|
public static final String APP_TWITTER_LINK = "https://twitter.com/retromusicapp";
|
||||||
public static final String FAQ_LINK = "https://raw.githubusercontent.com/h4h13/RetroMusicPlayer/master/FAQ.md";
|
public static final String FAQ_LINK = "https://github.com/h4h13/RetroMusicPlayer/blob/master/FAQ.md";
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,15 +3,11 @@ package code.name.monkey.retromusic.dialogs;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.support.design.widget.BottomSheetDialogFragment;
|
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.Button;
|
import android.widget.Button;
|
||||||
import android.widget.EditText;
|
import android.widget.EditText;
|
||||||
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
import butterknife.BindView;
|
import butterknife.BindView;
|
||||||
import butterknife.ButterKnife;
|
import butterknife.ButterKnife;
|
||||||
import butterknife.OnClick;
|
import butterknife.OnClick;
|
||||||
|
@ -20,11 +16,13 @@ import code.name.monkey.appthemehelper.util.TintHelper;
|
||||||
import code.name.monkey.retromusic.R;
|
import code.name.monkey.retromusic.R;
|
||||||
import code.name.monkey.retromusic.util.PlaylistsUtil;
|
import code.name.monkey.retromusic.util.PlaylistsUtil;
|
||||||
import code.name.monkey.retromusic.views.RoundedBottomSheetDialogFragment;
|
import code.name.monkey.retromusic.views.RoundedBottomSheetDialogFragment;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author Karim Abou Zeid (kabouzeid), Aidan Follestad (afollestad)
|
* @author Karim Abou Zeid (kabouzeid), Aidan Follestad (afollestad)
|
||||||
*/
|
*/
|
||||||
public class RenamePlaylistDialog extends RoundedBottomSheetDialogFragment {
|
public class RenamePlaylistDialog extends RoundedBottomSheetDialogFragment {
|
||||||
|
|
||||||
@BindView(R.id.option_1)
|
@BindView(R.id.option_1)
|
||||||
EditText playlistName;
|
EditText playlistName;
|
||||||
@BindView(R.id.action_cancel)
|
@BindView(R.id.action_cancel)
|
||||||
|
@ -50,7 +48,8 @@ public class RenamePlaylistDialog extends RoundedBottomSheetDialogFragment {
|
||||||
case R.id.action_rename:
|
case R.id.action_rename:
|
||||||
if (!playlistName.toString().trim().equals("")) {
|
if (!playlistName.toString().trim().equals("")) {
|
||||||
long playlistId = getArguments().getLong("playlist_id");
|
long playlistId = getArguments().getLong("playlist_id");
|
||||||
PlaylistsUtil.renamePlaylist(getActivity(), playlistId, playlistName.toString());
|
PlaylistsUtil.renamePlaylist(getActivity(), playlistId,
|
||||||
|
playlistName.getText().toString());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -59,7 +58,8 @@ public class RenamePlaylistDialog extends RoundedBottomSheetDialogFragment {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
|
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,
|
||||||
|
@Nullable Bundle savedInstanceState) {
|
||||||
View layout = inflater.inflate(R.layout.dialog_playlist_rename, container, false);
|
View layout = inflater.inflate(R.layout.dialog_playlist_rename, container, false);
|
||||||
ButterKnife.bind(this, layout);
|
ButterKnife.bind(this, layout);
|
||||||
return layout;
|
return layout;
|
||||||
|
|
Loading…
Reference in a new issue