Skip to content

Commit

Permalink
Corrected count of history entries
Browse files Browse the repository at this point in the history
  • Loading branch information
dchristl committed Oct 9, 2023
1 parent 03f7630 commit c8be8ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions headless_haystack/lib/history/accessory_history.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ class _AccessoryHistoryState extends State<AccessoryHistory> {
@override
Widget build(BuildContext context) {
var historyEntries = widget.accessory.locationHistory;
var historyLength = historyEntries.length - 1;
var historyLength = historyEntries.length;
List<Polyline> polylines = [];

if (historyLength > 255) {
historyLength = 255;
}
int delta = (255 ~/ historyLength).ceil();
int delta = (255 ~/ (historyLength - 1)).ceil();
var blue = delta;

for (int i = 0; i < historyEntries.length - 1; i++) {
Expand Down

0 comments on commit c8be8ec

Please sign in to comment.