Skip to content
This repository has been archived by the owner on Jan 17, 2024. It is now read-only.

Commit

Permalink
fixed refresh method default value bug issue (v1.4.1)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael811125 committed Nov 3, 2023
1 parent 684aa27 commit 432e97f
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 5 deletions.
8 changes: 8 additions & 0 deletions Assets/InfiniteScrollView/Scripts/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
## CHANGELOG

## [1.4.1] - 2023-11-03
- Fixed Refresh method default value bug issue (disabledRefreshCells = false).
- Added SnapFirst and SnapMiddle in InfiniteScrollView.
```C#
public void SnapFirst(float duration)
public void SnapMiddle(float duration)
```

## [1.4.0] - 2023-11-03 (Breaking Changes)
- Modified namespace HowTungTung to InfiniteScrollViews.
- Modified RefreshCellVisibility access modifier to protected.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ protected override void RefreshCellVisibility()
}
}

public sealed override void Refresh(bool disabledRefreshCells = true)
public sealed override void Refresh(bool disabledRefreshCells = false)
{
if (!this.IsInitialized()) return;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ protected override void RefreshCellVisibility()
}
}

public sealed override void Refresh(bool disabledRefreshCells = true)
public sealed override void Refresh(bool disabledRefreshCells = false)
{
if (!IsInitialized()) return;

Expand Down
18 changes: 18 additions & 0 deletions Assets/InfiniteScrollView/Scripts/Runtime/InfiniteScrollView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,24 @@ public bool IsAtRight()
/// <param name="duration"></param>
public abstract void Snap(int index, float duration);

/// <summary>
/// Move to first cell
/// </summary>
/// <param name="duration"></param>
public void SnapFirst(float duration)
{
Snap(0, duration);
}

/// <summary>
/// Move to middle cell
/// </summary>
/// <param name="duration"></param>
public void SnapMiddle(float duration)
{
Snap((_dataList.Count - 1) >> 1, duration);
}

/// <summary>
/// Move to last cell
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ protected override void RefreshCellVisibility()
}
}

public sealed override void Refresh(bool disabledRefreshCells = true)
public sealed override void Refresh(bool disabledRefreshCells = false)
{
if (!IsInitialized()) return;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ protected override void RefreshCellVisibility()
}
}

public sealed override void Refresh(bool disabledRefreshCells = true)
public sealed override void Refresh(bool disabledRefreshCells = false)
{
if (!IsInitialized()) return;

Expand Down
2 changes: 1 addition & 1 deletion Assets/InfiniteScrollView/Scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "com.michaelo.infinitescrollview.unitask",
"displayName": "InfiniteScrollView with UniTask",
"description": "InfiniteScrollView is made for Unity extension, that support use as less as possible gameObject count to achieve large infinite scrolling content. Developed by native UGUI system, no any magical code inside, so you can easily modify and extend by yourself.",
"version": "1.4.0",
"version": "1.4.1",
"unity": "2021.3",
"license": "MIT",
"samples": [
Expand Down

0 comments on commit 432e97f

Please sign in to comment.