Update ButtonGrid.cs

Fix "Page 1 of 0" when no rows are existing.
This commit is contained in:
FlorianDahn 2020-09-08 15:32:04 +02:00
parent 2457773a12
commit 8592f4279d

View File

@ -496,6 +496,9 @@ namespace TelegramBotBase.Controls
bf = bf.FilterDuplicate(this.SearchQuery);
}
if (bf.Rows == 0)
return 1;
return (int)Math.Ceiling((decimal)(bf.Rows / (decimal)(MaximumRow - 3)));
}
}