ankidroid / ankidroid/Anki-Android

[BUG]: Empty the Front template and click save, no warning

Abierto
#16,220 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Anki Ecosystem Compatibility Priority-Low
Lenguaje dominante
Kotlin
Estrellas
11.8k
Forks
2.9k
Merge medio
2 d 3 h
PR fusionados (30 d)
171

Descripción

### 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

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

If I set the Front template empty, no warning shows up.
However, on the desktop version of Anki, it will show a warning if you want to empty the front and don't allow the user to empty the front.
I think we should do the same things that don't allow users to empty the front, the same as the desktop version of Anki

Steps to Reproduce this bug:
1. click card brower
2. click to edit one card
3. click Cards to edit the template
4. clear the text in front template
5. click save

### Expected behaviour

It should not allow the user to empty the Front, just as the desktop Anki does.
![image](https://github.com/ankidroid/Anki-Android/assets/31406320/9cf1f1d3-ad0b-41b6-9718-865f175add9b)

### Actual behaviour

It allow the user to empty front template and save.
If you review this card, it will display like this:
![image](https://github.com/ankidroid/Anki-Android/assets/31406320/9b5cc818-4a11-470c-9155-3ed5dbd6b122)

### Debug info

```text
AnkiDroid Version = 2.17.6 (568538896be943818ca793dd2635822265712def)

Backend Version = 0.1.34-anki23.12.1 (23.12.1 1a1d4d5419c6b57ef3baf99c9d2d9cf85d36ae0a)

Android Version = 10 (SDK 29)

ProductFlavor = amazon

Manufacturer = unknown

Model = Android SDK built for x86

Hardware = ranchu

Webview User Agent = Mozilla/5.0 (Linux; Android 10; Android SDK built for x86 Build/QSR1.210820.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/74.0.3729.185 Mobile Safari/537.36

ACRA UUID = b8c60fbd-e11e-4dec-9008-73f0d38b53dd

Crash Reports Enabled = true
```

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

_No response_

### Research

- [X] I am reporting a bug specific to AnkiDroid (Android app)
- [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))

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.