fix: Prevent a crash if trending tags, links, or statuses are added to tabs (#323)

The previous code was serialising the `TabKind` enum without the `_`, so
when it was converted back to the enum name (which has a `_`) it failed
and immediately crashed.

Fixes #306
This commit is contained in:
Nik Clayton 2023-12-14 12:25:03 +01:00 committed by GitHub
parent b294a3bace
commit fe8f84847b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -28,9 +28,9 @@ enum class TabKind(val repr: String) {
LOCAL("Local"), LOCAL("Local"),
FEDERATED("Federated"), FEDERATED("Federated"),
DIRECT("Direct"), DIRECT("Direct"),
TRENDING_TAGS("TrendingTags"), TRENDING_TAGS("Trending_Tags"),
TRENDING_LINKS("TrendingLinks"), TRENDING_LINKS("Trending_Links"),
TRENDING_STATUSES("TrendingStatuses"), TRENDING_STATUSES("Trending_Statuses"),
HASHTAG("Hashtag"), HASHTAG("Hashtag"),
LIST("List"), LIST("List"),
BOOKMARKS("Bookmarks") BOOKMARKS("Bookmarks")