mirror of
https://github.com/zoriya/Opus.git
synced 2025-12-06 06:26:15 +00:00
Solving a bug with playlist view.
This commit is contained in:
@@ -64,8 +64,7 @@ namespace MusicApp
|
||||
public SwipeRefreshLayout contentRefresh;
|
||||
public bool usePager;
|
||||
public bool HomeDetails = false;
|
||||
public bool paused = false;
|
||||
public bool StateSaved = false;
|
||||
public bool Paused = false;
|
||||
|
||||
public bool prepared = false;
|
||||
public BottomSheetBehavior SheetBehavior;
|
||||
@@ -926,7 +925,7 @@ namespace MusicApp
|
||||
{
|
||||
if (displayToast)
|
||||
{
|
||||
if (instance != null && !instance.StateSaved)
|
||||
if (instance != null && !instance.Paused)
|
||||
{
|
||||
Snackbar snackBar = Snackbar.Make(instance.FindViewById(Resource.Id.snackBar), "You are not connected to internet, can't check for updates.", Snackbar.LengthLong);
|
||||
snackBar.View.FindViewById<TextView>(Resource.Id.snackbar_text).SetTextColor(Color.White);
|
||||
@@ -983,7 +982,7 @@ namespace MusicApp
|
||||
{
|
||||
if (!beta)
|
||||
{
|
||||
if ((instance != null && !instance.StateSaved) || Preferences.instance != null)
|
||||
if ((instance != null && !instance.Paused) || Preferences.instance != null)
|
||||
{
|
||||
Snackbar snackBar;
|
||||
if (Preferences.instance != null)
|
||||
@@ -998,7 +997,7 @@ namespace MusicApp
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((instance != null && !instance.StateSaved) || Preferences.instance != null)
|
||||
if ((instance != null && !instance.Paused) || Preferences.instance != null)
|
||||
{
|
||||
Snackbar snackBar;
|
||||
if (Preferences.instance != null)
|
||||
@@ -1054,9 +1053,8 @@ namespace MusicApp
|
||||
protected override void OnResume()
|
||||
{
|
||||
base.OnResume();
|
||||
paused = false;
|
||||
Paused = false;
|
||||
instance = this;
|
||||
StateSaved = false;
|
||||
|
||||
if (CastContext.SessionManager.CurrentSession == null && MusicPlayer.CurrentID() == -1)
|
||||
MusicPlayer.currentID = MusicPlayer.RetrieveQueueSlot();
|
||||
@@ -1101,7 +1099,7 @@ namespace MusicApp
|
||||
protected override void OnPause()
|
||||
{
|
||||
base.OnPause();
|
||||
paused = true;
|
||||
Paused = true;
|
||||
}
|
||||
|
||||
public override void OnBackPressed()
|
||||
@@ -1114,12 +1112,6 @@ namespace MusicApp
|
||||
base.OnBackPressed();
|
||||
}
|
||||
|
||||
protected override void OnSaveInstanceState(Bundle outState)
|
||||
{
|
||||
StateSaved = true;
|
||||
base.OnSaveInstanceState(outState);
|
||||
}
|
||||
|
||||
protected override void OnNewIntent(Intent intent)
|
||||
{
|
||||
base.OnNewIntent(intent);
|
||||
|
||||
@@ -245,7 +245,7 @@ namespace MusicApp.Resources.Portable_Class
|
||||
{
|
||||
Activity.FindViewById<ImageButton>(Resource.Id.headerMore).Click -= PlaylistMore;
|
||||
|
||||
if (!MainActivity.instance.StateSaved)
|
||||
if (!MainActivity.instance.Paused)
|
||||
{
|
||||
int statusHeight = Resources.GetDimensionPixelSize(Resources.GetIdentifier("status_bar_height", "dimen", "android"));
|
||||
MainActivity.instance.FindViewById(Resource.Id.toolbar).SetPadding(0, 0, 0, 0);
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
<android.support.design.widget.CollapsingToolbarLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_scrollFlags="scroll"
|
||||
android:id="@+id/collapsingToolbar"
|
||||
android:fitsSystemWindows="true"
|
||||
app:titleEnabled="false" >
|
||||
|
||||
Reference in New Issue
Block a user