This repository has been archived by the owner on Jan 17, 2024. It is now read-only.
Release v1.4.0
[1.4.0] - 2023-11-03 (Breaking Changes)
- Modified namespace HowTungTung to InfiniteScrollViews.
- Modified RefreshCellVisibility access modifier to protected.
protected abstract void RefreshCellVisibility();
- Modified Add, Insert, Remove, Refresh, Clear methods (Removed async behaviour, won't auto InitializePool).
- Added RefreshCellVisibilityWithCheck method in InfiniteScrollView.
public void RefreshCellVisibilityWithCheck()
- Added visibleCount param in InfiniteScrollView.
public int visibleCount { get; protected set; }
- Added lastMaxVisibleCount param in InfiniteScrollView.
public int lastMaxVisibleCount { get; protected set; }
- Added isVisibleRangeFilled param in InfiniteScrollView.
public bool isVisibleRangeFilled { get; protected set; }
- Added DataCount() method in InfiniteScrollView.
public int DataCount()
- Added param for Refresh(bool disabledRefreshCells = false) method of InfiniteScrollView.
/// <summary>
/// Refresh scrollView (doesn't need to await, if scrollView already initialized)
/// </summary>
/// <param name="disabledRefreshCells">Disable refresh cells, when disabled will mark flag to refresh all at next scrolling.</param>
/// <returns></returns>
public abstract UniTask Refresh(bool disabledRefreshCells = false)
- Optimized code.
※Note: If you add data and don't want to refresh cells every times. You can determines infiniteScrollView.isVisibleRangeFilled == true and set disabledRefreshCells = true, will help you to mark flag and refresh once all at next scrolling.
public void AddCellData()
{
var data = new InfiniteCellData(new Vector2(100, 100));
infiniteScrollView.Add(data);
if(!infiniteScrollView.isVisibleRangeFilled) infiniteScrollView.Refresh();
else infiniteScrollView.Refresh(true);
}