ankidroid / ankidroid/Anki-Android

Deck deletion causes Default deck to appear in right window when DeckPicker is fragmented

Ouverte
#21,087 3 commentaires 0 réactions 1 personne assignée Réclamée par @sanjaysargam Voir sur GitHub
Help Wanted Home Screen Needs Triage
Langage dominant
Kotlin
Étoiles
11.8k
Forks
2.9k
Merge moyen
2 j 3 h
PR mergées (30 j)
167

Description

### Checked for duplicates?

- [x] This issue is not a duplicate

### Does it also happen in the desktop version?

- [x] This bug does not occur in the latest version of Anki Desktop

### What are the steps to reproduce this bug?

1. On a tablet or other wide screen, open the DeckPicker.
2. Ensure the collection is non-empty. The screen should be fragmented with the StudyOptionsFragment open on the right.
3. Ensure the Default deck is deleted and not present in the left-hand deck list.
4. Select a deck, then delete it (the collection should still be non-empty).
5. The StudyOptionsFragment displays the Default deck!

https://github.com/user-attachments/assets/3d66a18b-7213-4f6f-939d-864ed7bcf6c6

cc @Haz3-jolt

### Expected behaviour

The StudyOptionsFragment should show the next available deck.

### Debug info

```text
AnkiDroid Version = 2.24.0 (ebcf8e0e34921628b9b8a496c66ffd4adbb3705f) Backend Version = 0.1.64-anki25.09.2 (25.09.2 3890e12c9e48c028c3f12aa58cb64bd9f8895e30) Android Version = 16 (SDK 36) ProductFlavor = play Device Info = samsung | samsung | dm1q | dm1qcsx | SM-S911W | qcom WebView Info = [com.google.android.webview | 772713703]: Mozilla/5.0 (Linux; Android 16; SM-S911W Build/BP2A.250605.031.A3; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/147.0.7727.137 Mobile Safari/537.36 ACRA UUID = 4b66439e-1695-436a-854a-be601b87b058 FSRS = 5.1.0 (Enabled: true) Crash Reports Enabled = true
```

### (Optional) Anything else you want to share?

_No response_

### Research

- [x] I have checked the [manual](https://ankidroid.org/docs/manual.html) and the [FAQ](https://github.com/ankidroid/Anki-Android/wiki/FAQ) and could not find a solution to my issue
- [x] (Optional) I have confirmed the issue is not resolved in the latest alpha release ([instructions](https://docs.ankidroid.org/manual.html#betaTesting))

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.