mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-01-11 22:40:36 +00:00
fix: show chanded source preference for mihon source
This commit is contained in:
parent
e40e1b8fe6
commit
344533aeb1
1 changed files with 7 additions and 0 deletions
|
|
@ -1,3 +1,4 @@
|
|||
import 'dart:convert';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
|
|
@ -30,6 +31,12 @@ class _ExtensionDetailState extends ConsumerState<ExtensionDetail> {
|
|||
late Source source = isar.sources.getSync(widget.source.id!)!;
|
||||
late List<SourcePreference>? sourcePreference = () {
|
||||
try {
|
||||
if (source.sourceCodeLanguage == SourceCodeLanguage.mihon &&
|
||||
source.preferenceList != null) {
|
||||
return (jsonDecode(source.preferenceList!) as List)
|
||||
.map((e) => SourcePreference.fromJson(e))
|
||||
.toList();
|
||||
}
|
||||
return getSourcePreference(
|
||||
source: source,
|
||||
).map((e) => getSourcePreferenceEntry(e.key!, source.id!)).toList();
|
||||
|
|
|
|||
Loading…
Reference in a new issue