release 1.0.523
fix: tab crash out in Android optimize: open date picker in scrolling
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0.522" package="org.tsanie.pixiview" android:versionCode="11">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.0.523" package="org.tsanie.pixiview" android:versionCode="12">
|
||||||
<uses-sdk android:minSdkVersion="25" android:targetSdkVersion="28" />
|
<uses-sdk android:minSdkVersion="25" android:targetSdkVersion="28" />
|
||||||
<application android:label="Pixiview" android:icon="@mipmap/icon" android:roundIcon="@mipmap/icon_round"></application>
|
<application android:label="Pixiview" android:icon="@mipmap/icon" android:roundIcon="@mipmap/icon_round"></application>
|
||||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
|
@ -65,7 +65,7 @@ namespace Pixiview.Droid.Renderers.AppShellSection
|
|||||||
bottomView.ItemIconTintList = _colorStateList;
|
bottomView.ItemIconTintList = _colorStateList;
|
||||||
|
|
||||||
var menu = bottomView.Menu;
|
var menu = bottomView.Menu;
|
||||||
if (menu != null && menu.HasVisibleItems)
|
if (menu != null && menu.HasVisibleItems && menu.Size() == 4)
|
||||||
{
|
{
|
||||||
var itemUser = menu.GetItem(0);
|
var itemUser = menu.GetItem(0);
|
||||||
itemUser.SetIcon(itemUser.IsChecked ?
|
itemUser.SetIcon(itemUser.IsChecked ?
|
||||||
|
@ -29,8 +29,8 @@
|
|||||||
<string>com.apple.share-services</string>
|
<string>com.apple.share-services</string>
|
||||||
</dict>
|
</dict>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.0.522</string>
|
<string>1.0.523</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>11</string>
|
<string>12</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
@ -79,8 +79,8 @@
|
|||||||
</dict>
|
</dict>
|
||||||
</array>
|
</array>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.0.522</string>
|
<string>1.0.523</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>11</string>
|
<string>12</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
@ -111,7 +111,6 @@ namespace Pixiview.iOS.Renderers.AppShellSection
|
|||||||
tabBar.UnselectedItemTintColor = _defaultUnselectedTint;
|
tabBar.UnselectedItemTintColor = _defaultUnselectedTint;
|
||||||
}
|
}
|
||||||
|
|
||||||
[SuppressMessage("Code Notifications", "XI0001:Notifies you with advices on how to use Apple APIs", Justification = "<Pending>")]
|
|
||||||
public void SetAppearance(UITabBarController controller, ShellAppearance appearance)
|
public void SetAppearance(UITabBarController controller, ShellAppearance appearance)
|
||||||
{
|
{
|
||||||
IShellAppearanceElement appearanceElement = appearance;
|
IShellAppearanceElement appearanceElement = appearance;
|
||||||
@ -120,21 +119,6 @@ namespace Pixiview.iOS.Renderers.AppShellSection
|
|||||||
var tintColor = appearanceElement.EffectiveTabBarForegroundColor; // appearanceElement.EffectiveTabBarTitleColor;
|
var tintColor = appearanceElement.EffectiveTabBarForegroundColor; // appearanceElement.EffectiveTabBarTitleColor;
|
||||||
|
|
||||||
var tabBar = controller.TabBar;
|
var tabBar = controller.TabBar;
|
||||||
if (tabBar.Items != null && tabBar.Items.Length == 4)
|
|
||||||
{
|
|
||||||
var tabUser = tabBar.Items[0];
|
|
||||||
tabUser.Image = UIImage.FromBundle("IconUserRegular");
|
|
||||||
tabUser.SelectedImage = UIImage.FromBundle("IconUser");
|
|
||||||
var tabRecommend = tabBar.Items[1];
|
|
||||||
tabRecommend.Image = UIImage.FromBundle("IconSparklesRegular");
|
|
||||||
tabRecommend.SelectedImage = UIImage.FromBundle("IconSparkles");
|
|
||||||
var tabRank = tabBar.Items[2];
|
|
||||||
tabRank.Image = UIImage.FromBundle("IconSortRegular");
|
|
||||||
tabRank.SelectedImage = UIImage.FromBundle("IconSort");
|
|
||||||
var tabFavorite = tabBar.Items[3];
|
|
||||||
tabFavorite.Image = UIImage.FromBundle("IconBookmarkRegular");
|
|
||||||
tabFavorite.SelectedImage = UIImage.FromBundle("IconBookmark");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_defaultTint == null)
|
if (_defaultTint == null)
|
||||||
{
|
{
|
||||||
@ -163,8 +147,25 @@ namespace Pixiview.iOS.Renderers.AppShellSection
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[SuppressMessage("Code Notifications", "XI0001:Notifies you with advices on how to use Apple APIs", Justification = "<Pending>")]
|
||||||
public void UpdateLayout(UITabBarController controller)
|
public void UpdateLayout(UITabBarController controller)
|
||||||
{
|
{
|
||||||
|
var tabBar = controller.TabBar;
|
||||||
|
if (tabBar != null && tabBar.Items != null && tabBar.Items.Length == 4)
|
||||||
|
{
|
||||||
|
var tabUser = tabBar.Items[0];
|
||||||
|
tabUser.Image = UIImage.FromBundle("IconUserRegular");
|
||||||
|
tabUser.SelectedImage = UIImage.FromBundle("IconUser");
|
||||||
|
var tabRecommend = tabBar.Items[1];
|
||||||
|
tabRecommend.Image = UIImage.FromBundle("IconSparklesRegular");
|
||||||
|
tabRecommend.SelectedImage = UIImage.FromBundle("IconSparkles");
|
||||||
|
var tabRank = tabBar.Items[2];
|
||||||
|
tabRank.Image = UIImage.FromBundle("IconSortRegular");
|
||||||
|
tabRank.SelectedImage = UIImage.FromBundle("IconSort");
|
||||||
|
var tabFavorite = tabBar.Items[3];
|
||||||
|
tabFavorite.Image = UIImage.FromBundle("IconBookmarkRegular");
|
||||||
|
tabFavorite.SelectedImage = UIImage.FromBundle("IconBookmark");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,6 +67,7 @@ namespace Pixiview.Illust
|
|||||||
protected virtual bool IsFavoriteVisible => true;
|
protected virtual bool IsFavoriteVisible => true;
|
||||||
protected virtual bool IsAutoReload => true;
|
protected virtual bool IsAutoReload => true;
|
||||||
protected virtual bool IsRedirectLogin => false;
|
protected virtual bool IsRedirectLogin => false;
|
||||||
|
protected virtual bool NeedCookie => false;
|
||||||
protected virtual ActivityIndicator LoadingIndicator => null;
|
protected virtual ActivityIndicator LoadingIndicator => null;
|
||||||
protected virtual double IndicatorMarginTop => 16;
|
protected virtual double IndicatorMarginTop => 16;
|
||||||
|
|
||||||
@ -195,6 +196,7 @@ namespace Pixiview.Illust
|
|||||||
|
|
||||||
protected abstract T DoLoadIllustData(bool force);
|
protected abstract T DoLoadIllustData(bool force);
|
||||||
protected abstract IEnumerable<IllustItem> DoGetIllustList(T data);
|
protected abstract IEnumerable<IllustItem> DoGetIllustList(T data);
|
||||||
|
|
||||||
protected virtual IllustCollection GetIllustsLoadedCollection(IllustCollection collection, bool bottom)
|
protected virtual IllustCollection GetIllustsLoadedCollection(IllustCollection collection, bool bottom)
|
||||||
{
|
{
|
||||||
IllustCollection = collection;
|
IllustCollection = collection;
|
||||||
@ -563,7 +565,7 @@ namespace Pixiview.Illust
|
|||||||
{
|
{
|
||||||
extra = string.Empty;
|
extra = string.Empty;
|
||||||
}
|
}
|
||||||
_ = DisplayAlert(ResourceHelper.Title,
|
await DisplayAlert(ResourceHelper.Title,
|
||||||
ResourceHelper.FailedResponse + extra,
|
ResourceHelper.FailedResponse + extra,
|
||||||
ResourceHelper.Ok);
|
ResourceHelper.Ok);
|
||||||
}
|
}
|
||||||
@ -591,7 +593,7 @@ namespace Pixiview.Illust
|
|||||||
#if DEBUG
|
#if DEBUG
|
||||||
App.DebugPrint($"start loading data, force: {force}");
|
App.DebugPrint($"start loading data, force: {force}");
|
||||||
#endif
|
#endif
|
||||||
if (force && string.IsNullOrEmpty(Configs.Cookie))
|
if (force && NeedCookie && string.IsNullOrEmpty(Configs.Cookie))
|
||||||
{
|
{
|
||||||
MainThread.BeginInvokeOnMainThread(RedirectFailed);
|
MainThread.BeginInvokeOnMainThread(RedirectFailed);
|
||||||
App.DebugPrint($"no cookie found");
|
App.DebugPrint($"no cookie found");
|
||||||
@ -703,8 +705,8 @@ namespace Pixiview.Illust
|
|||||||
{
|
{
|
||||||
protected const int SCROLL_OFFSET = 33;
|
protected const int SCROLL_OFFSET = 33;
|
||||||
protected ScrollDirection scrollDirection = ScrollDirection.Stop;
|
protected ScrollDirection scrollDirection = ScrollDirection.Stop;
|
||||||
|
protected double lastScrollY = double.MinValue;
|
||||||
|
|
||||||
private double lastScrollY = double.MinValue;
|
|
||||||
private double lastRefreshY = double.MinValue;
|
private double lastRefreshY = double.MinValue;
|
||||||
private double offset;
|
private double offset;
|
||||||
|
|
||||||
@ -763,6 +765,10 @@ namespace Pixiview.Illust
|
|||||||
{
|
{
|
||||||
lastScrollY = y;
|
lastScrollY = y;
|
||||||
|
|
||||||
|
if (scrollDirection == ScrollDirection.Up)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (y > 0 && offset > 0 && y - topOffset > offset)
|
if (y > 0 && offset > 0 && y - topOffset > offset)
|
||||||
{
|
{
|
||||||
if (IsLoading || IsBottomLoading)
|
if (IsLoading || IsBottomLoading)
|
||||||
|
@ -36,6 +36,7 @@ namespace Pixiview.Illust
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected override bool IsRedirectLogin => true;
|
protected override bool IsRedirectLogin => true;
|
||||||
|
protected override bool NeedCookie => true;
|
||||||
protected override ActivityIndicator LoadingIndicator => activityLoading;
|
protected override ActivityIndicator LoadingIndicator => activityLoading;
|
||||||
protected override double IndicatorMarginTop => 66;
|
protected override double IndicatorMarginTop => 66;
|
||||||
|
|
||||||
|
@ -109,6 +109,8 @@
|
|||||||
ios:DatePicker.UpdateMode="WhenFinished"
|
ios:DatePicker.UpdateMode="WhenFinished"
|
||||||
Date="{Binding SelectedDate}"
|
Date="{Binding SelectedDate}"
|
||||||
MaximumDate="{Binding MaximumDate}"
|
MaximumDate="{Binding MaximumDate}"
|
||||||
|
Focused="DatePicker_Focused"
|
||||||
|
Unfocused="DatePicker_Focused"
|
||||||
DateSelected="DatePicker_DateSelected"/>
|
DateSelected="DatePicker_DateSelected"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</i:IllustRankingDataCollectionPage>
|
</i:IllustRankingDataCollectionPage>
|
||||||
|
@ -97,6 +97,7 @@ namespace Pixiview.Illust
|
|||||||
private bool nextEnabled;
|
private bool nextEnabled;
|
||||||
|
|
||||||
private bool isFilterVisible;
|
private bool isFilterVisible;
|
||||||
|
private bool isDatePickerVisible;
|
||||||
private string lastQueryKey;
|
private string lastQueryKey;
|
||||||
private string queryDate;
|
private string queryDate;
|
||||||
private string previousDate;
|
private string previousDate;
|
||||||
@ -264,7 +265,7 @@ namespace Pixiview.Illust
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnDateTrigger(string action)
|
private async void OnDateTrigger(string action)
|
||||||
{
|
{
|
||||||
if (IsLoading)
|
if (IsLoading)
|
||||||
{
|
{
|
||||||
@ -272,6 +273,8 @@ namespace Pixiview.Illust
|
|||||||
}
|
}
|
||||||
if (action == "select")
|
if (action == "select")
|
||||||
{
|
{
|
||||||
|
// stop the scrolling
|
||||||
|
await scrollView.ScrollToAsync(scrollView.ScrollX, scrollView.ScrollY, false);
|
||||||
datePicker.Focus();
|
datePicker.Focus();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -303,6 +306,11 @@ namespace Pixiview.Illust
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void DatePicker_Focused(object sender, FocusEventArgs e)
|
||||||
|
{
|
||||||
|
isDatePickerVisible = e.IsFocused;
|
||||||
|
}
|
||||||
|
|
||||||
private void DatePicker_DateSelected(object sender, DateChangedEventArgs e)
|
private void DatePicker_DateSelected(object sender, DateChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (e.OldDate == DateTime.Today || IsLoading)
|
if (e.OldDate == DateTime.Today || IsLoading)
|
||||||
@ -348,6 +356,11 @@ namespace Pixiview.Illust
|
|||||||
ToggleFilterPanel(false);
|
ToggleFilterPanel(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (isDatePickerVisible)
|
||||||
|
{
|
||||||
|
isDatePickerVisible = false;
|
||||||
|
datePicker.Unfocus();
|
||||||
|
}
|
||||||
OnScrolled(y);
|
OnScrolled(y);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@ namespace Pixiview.Illust
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override bool NeedCookie => true;
|
||||||
protected override ActivityIndicator LoadingIndicator => activityLoading;
|
protected override ActivityIndicator LoadingIndicator => activityLoading;
|
||||||
|
|
||||||
public override void OnUnload()
|
public override void OnUnload()
|
||||||
|
Reference in New Issue
Block a user