Commit f73f0327 authored by Mateusz Żebrak's avatar Mateusz Żebrak Committed by Marcin Sobczyk
Browse files

Fix crash when spamming "r" to remove account

Crash was:
```
│ /workspace/clive/clive/__private/ui/screens/dashboard/dashboard.py:348 in focus_other_row                                                              │
│                                                                                                                                                        │
│   345 │   @on(TrackedAccountRow.FocusOtherRow)                                                 ╭─────────────────── locals ───────────────────╮        │
│   346 │   def focus_other_row(self, event: TrackedAccountRow.FocusOtherRow) -> None:           │ event = FocusOtherRow()                      │        │
│   347 │   │   rows = self.query(TrackedAccountRow)                                             │  rows = <DOMQuery query='TrackedAccountRow'> │        │
│ ❱ 348 │   │   target_index = event.target_index % len(rows)                                    │  self = Dashboard()                          │        │
│   349 │   │   rows[target_index].focus()                                                       ╰──────────────────────────────────────────────╯        │
│   350 │                                                                                                                                                │
│   351 │   async def _update_account_containers(self, profile: Profile) -> None:                                                                        │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
ZeroDivisionError: integer modulo by zero
```
parent ccd73ea4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment