diff --git a/lib/eval/dart/bridge/m_source.dart b/lib/eval/dart/bridge/m_source.dart index 3f7648e3..3c5b7bb2 100644 --- a/lib/eval/dart/bridge/m_source.dart +++ b/lib/eval/dart/bridge/m_source.dart @@ -45,6 +45,9 @@ class $MSource implements MSource, $Instance { 'additionalParams': BridgeFieldDef( BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.string)), ), + 'notes': BridgeFieldDef( + BridgeTypeAnnotation(BridgeTypeRef(CoreTypes.string)), + ), }, wrap: true, ); @@ -84,6 +87,8 @@ class $MSource implements MSource, $Instance { return $String($value.apiUrl!); case 'additionalParams': return $String($value.additionalParams!); + case 'notes': + return $String($value.notes!); default: return _superclass.$getProperty(runtime, identifier); @@ -116,6 +121,8 @@ class $MSource implements MSource, $Instance { $value.apiUrl = value.$reified; case 'additionalParams': $value.additionalParams = value.$reified; + case 'notes': + $value.notes = value.$reified; default: _superclass.$setProperty(runtime, identifier, value); } @@ -151,6 +158,9 @@ class $MSource implements MSource, $Instance { @override String? get additionalParams => $value.additionalParams; + @override + String? get notes => $value.notes; + @override set apiUrl(String? apiUrl) {} @@ -181,6 +191,9 @@ class $MSource implements MSource, $Instance { @override set additionalParams(String? additionalParams) {} + @override + set notes(String? notes) {} + @override Map toJson() => { 'apiUrl': apiUrl, @@ -193,5 +206,6 @@ class $MSource implements MSource, $Instance { 'lang': lang, 'name': name, 'additionalParams': additionalParams, + 'notes': notes, }; } diff --git a/lib/eval/model/m_source.dart b/lib/eval/model/m_source.dart index e9704b83..4db5e8fc 100644 --- a/lib/eval/model/m_source.dart +++ b/lib/eval/model/m_source.dart @@ -19,6 +19,8 @@ class MSource { String? additionalParams; + String? notes; + MSource({ this.id, this.name, @@ -30,6 +32,7 @@ class MSource { this.dateFormatLocale, this.apiUrl, this.additionalParams, + this.notes, }); Map toJson() => { @@ -43,5 +46,6 @@ class MSource { 'lang': lang, 'name': name, 'additionalParams': additionalParams, + 'notes': notes, }; } diff --git a/lib/l10n/app_de.arb b/lib/l10n/app_de.arb index e8553a77..a4a2a5d4 100644 --- a/lib/l10n/app_de.arb +++ b/lib/l10n/app_de.arb @@ -463,5 +463,6 @@ "clear_all_sources": "Alle Quellen löschen", "clear_all_sources_msg": "Dies wird alle Quellen der Anwendung vollständig löschen. Möchten Sie wirklich fortfahren?", "sources_cleared": "Quellen gelöscht!", - "add_repo": "Repository hinzufügen?" + "add_repo": "Repository hinzufügen?", + "extension_notes": "Hinweis: {notes}" } \ No newline at end of file diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index aaf60f7e..5e941bbe 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -460,5 +460,6 @@ "genre_search_library": "Search genre in library", "genre_search_source": "Browse in source", "source_not_added": "Source is not installed!", - "load_own_subtitles": "Load your own subtitles..." + "load_own_subtitles": "Load your own subtitles...", + "extension_notes": "Notes: {notes}" } \ No newline at end of file diff --git a/lib/l10n/generated/app_localizations.dart b/lib/l10n/generated/app_localizations.dart index 1219803e..ddeda4a2 100644 --- a/lib/l10n/generated/app_localizations.dart +++ b/lib/l10n/generated/app_localizations.dart @@ -2882,6 +2882,12 @@ abstract class AppLocalizations { /// In en, this message translates to: /// **'Load your own subtitles...'** String get load_own_subtitles; + + /// No description provided for @extension_notes. + /// + /// In en, this message translates to: + /// **'Notes: {notes}'** + String extension_notes(Object notes); } class _AppLocalizationsDelegate extends LocalizationsDelegate { diff --git a/lib/l10n/generated/app_localizations_ar.dart b/lib/l10n/generated/app_localizations_ar.dart index cb124e90..956005df 100644 --- a/lib/l10n/generated/app_localizations_ar.dart +++ b/lib/l10n/generated/app_localizations_ar.dart @@ -1438,4 +1438,9 @@ class AppLocalizationsAr extends AppLocalizations { @override String get load_own_subtitles => 'تحميل الترجمة الخاصة بك...'; + + @override + String extension_notes(Object notes) { + return 'Notes: $notes'; + } } diff --git a/lib/l10n/generated/app_localizations_de.dart b/lib/l10n/generated/app_localizations_de.dart index 7e27c4ab..f9efc137 100644 --- a/lib/l10n/generated/app_localizations_de.dart +++ b/lib/l10n/generated/app_localizations_de.dart @@ -1438,4 +1438,9 @@ class AppLocalizationsDe extends AppLocalizations { @override String get load_own_subtitles => 'Deine eigene Untertiteln laden...'; + + @override + String extension_notes(Object notes) { + return 'Hinweis: $notes'; + } } diff --git a/lib/l10n/generated/app_localizations_en.dart b/lib/l10n/generated/app_localizations_en.dart index eb25a7c9..2063c157 100644 --- a/lib/l10n/generated/app_localizations_en.dart +++ b/lib/l10n/generated/app_localizations_en.dart @@ -1438,4 +1438,9 @@ class AppLocalizationsEn extends AppLocalizations { @override String get load_own_subtitles => 'Load your own subtitles...'; + + @override + String extension_notes(Object notes) { + return 'Notes: $notes'; + } } diff --git a/lib/l10n/generated/app_localizations_es.dart b/lib/l10n/generated/app_localizations_es.dart index 8cc1c84c..3a653f23 100644 --- a/lib/l10n/generated/app_localizations_es.dart +++ b/lib/l10n/generated/app_localizations_es.dart @@ -1438,6 +1438,11 @@ class AppLocalizationsEs extends AppLocalizations { @override String get load_own_subtitles => 'Cargar tus propios subtítulos...'; + + @override + String extension_notes(Object notes) { + return 'Notes: $notes'; + } } /// The translations for Spanish Castilian, as used in Latin America and the Caribbean (`es_419`). diff --git a/lib/l10n/generated/app_localizations_fr.dart b/lib/l10n/generated/app_localizations_fr.dart index 7b37b868..8bb37ea5 100644 --- a/lib/l10n/generated/app_localizations_fr.dart +++ b/lib/l10n/generated/app_localizations_fr.dart @@ -1438,4 +1438,9 @@ class AppLocalizationsFr extends AppLocalizations { @override String get load_own_subtitles => 'Charger vos propres sous-titres...'; + + @override + String extension_notes(Object notes) { + return 'Notes: $notes'; + } } diff --git a/lib/l10n/generated/app_localizations_id.dart b/lib/l10n/generated/app_localizations_id.dart index 0bd60f26..c3e29778 100644 --- a/lib/l10n/generated/app_localizations_id.dart +++ b/lib/l10n/generated/app_localizations_id.dart @@ -1438,4 +1438,9 @@ class AppLocalizationsId extends AppLocalizations { @override String get load_own_subtitles => 'Muat subtitle Anda sendiri...'; + + @override + String extension_notes(Object notes) { + return 'Notes: $notes'; + } } diff --git a/lib/l10n/generated/app_localizations_it.dart b/lib/l10n/generated/app_localizations_it.dart index 5b4798cb..a7b16e5a 100644 --- a/lib/l10n/generated/app_localizations_it.dart +++ b/lib/l10n/generated/app_localizations_it.dart @@ -1438,4 +1438,9 @@ class AppLocalizationsIt extends AppLocalizations { @override String get load_own_subtitles => 'Carica i tuoi sottotitoli...'; + + @override + String extension_notes(Object notes) { + return 'Notes: $notes'; + } } diff --git a/lib/l10n/generated/app_localizations_pt.dart b/lib/l10n/generated/app_localizations_pt.dart index 0ae06caa..316b94a7 100644 --- a/lib/l10n/generated/app_localizations_pt.dart +++ b/lib/l10n/generated/app_localizations_pt.dart @@ -1438,6 +1438,11 @@ class AppLocalizationsPt extends AppLocalizations { @override String get load_own_subtitles => 'Carregar suas próprias legendas...'; + + @override + String extension_notes(Object notes) { + return 'Notes: $notes'; + } } /// The translations for Portuguese, as used in Brazil (`pt_BR`). diff --git a/lib/l10n/generated/app_localizations_ru.dart b/lib/l10n/generated/app_localizations_ru.dart index cc32a7f7..4a6e38cb 100644 --- a/lib/l10n/generated/app_localizations_ru.dart +++ b/lib/l10n/generated/app_localizations_ru.dart @@ -1438,4 +1438,9 @@ class AppLocalizationsRu extends AppLocalizations { @override String get load_own_subtitles => 'Загрузить свои собственные субтитры...'; + + @override + String extension_notes(Object notes) { + return 'Notes: $notes'; + } } diff --git a/lib/l10n/generated/app_localizations_th.dart b/lib/l10n/generated/app_localizations_th.dart index 0a123548..fbb7f3aa 100644 --- a/lib/l10n/generated/app_localizations_th.dart +++ b/lib/l10n/generated/app_localizations_th.dart @@ -1438,4 +1438,9 @@ class AppLocalizationsTh extends AppLocalizations { @override String get load_own_subtitles => 'โหลดคำบรรยายของคุณเอง...'; + + @override + String extension_notes(Object notes) { + return 'Notes: $notes'; + } } diff --git a/lib/l10n/generated/app_localizations_tr.dart b/lib/l10n/generated/app_localizations_tr.dart index 4524cae8..249f40b3 100644 --- a/lib/l10n/generated/app_localizations_tr.dart +++ b/lib/l10n/generated/app_localizations_tr.dart @@ -1438,4 +1438,9 @@ class AppLocalizationsTr extends AppLocalizations { @override String get load_own_subtitles => 'Kendi altyazılarınızı yükleyin...'; + + @override + String extension_notes(Object notes) { + return 'Notes: $notes'; + } } diff --git a/lib/l10n/generated/app_localizations_zh.dart b/lib/l10n/generated/app_localizations_zh.dart index 13531533..3a89b4ed 100644 --- a/lib/l10n/generated/app_localizations_zh.dart +++ b/lib/l10n/generated/app_localizations_zh.dart @@ -1438,4 +1438,9 @@ class AppLocalizationsZh extends AppLocalizations { @override String get load_own_subtitles => '加载自定义字幕'; + + @override + String extension_notes(Object notes) { + return 'Notes: $notes'; + } } diff --git a/lib/models/source.dart b/lib/models/source.dart index b965a21b..a873261b 100644 --- a/lib/models/source.dart +++ b/lib/models/source.dart @@ -65,6 +65,8 @@ class Source { @enumerated SourceCodeLanguage sourceCodeLanguage = SourceCodeLanguage.dart; + String? notes; + Repo? repo; Source({ @@ -95,6 +97,7 @@ class Source { this.additionalParams = "", this.isLocal = false, this.isObsolete = false, + this.notes = '', this.repo, }); @@ -128,6 +131,7 @@ class Source { isLocal = json['isLocal']; sourceCodeLanguage = SourceCodeLanguage.values[json['sourceCodeLanguage'] ?? 0]; + notes = json['notes'] ?? ""; repo = json['repo'] != null ? Repo.fromJson(json['repo']) : null; } @@ -160,6 +164,7 @@ class Source { 'sourceCodeLanguage': sourceCodeLanguage.index, 'isObsolete': isObsolete, 'isLocal': isLocal, + 'notes': notes, 'repo': repo?.toJson(), }; diff --git a/lib/models/source.g.dart b/lib/models/source.g.dart index 403049f0..c6635c3c 100644 --- a/lib/models/source.g.dart +++ b/lib/models/source.g.dart @@ -128,40 +128,45 @@ const SourceSchema = CollectionSchema( name: r'name', type: IsarType.string, ), - r'repo': PropertySchema( + r'notes': PropertySchema( id: 22, + name: r'notes', + type: IsarType.string, + ), + r'repo': PropertySchema( + id: 23, name: r'repo', type: IsarType.object, target: r'Repo', ), r'sourceCode': PropertySchema( - id: 23, + id: 24, name: r'sourceCode', type: IsarType.string, ), r'sourceCodeLanguage': PropertySchema( - id: 24, + id: 25, name: r'sourceCodeLanguage', type: IsarType.byte, enumMap: _SourcesourceCodeLanguageEnumValueMap, ), r'sourceCodeUrl': PropertySchema( - id: 25, + id: 26, name: r'sourceCodeUrl', type: IsarType.string, ), r'typeSource': PropertySchema( - id: 26, + id: 27, name: r'typeSource', type: IsarType.string, ), r'version': PropertySchema( - id: 27, + id: 28, name: r'version', type: IsarType.string, ), r'versionLast': PropertySchema( - id: 28, + id: 29, name: r'versionLast', type: IsarType.string, ) @@ -246,6 +251,12 @@ int _sourceEstimateSize( bytesCount += 3 + value.length * 3; } } + { + final value = object.notes; + if (value != null) { + bytesCount += 3 + value.length * 3; + } + } { final value = object.repo; if (value != null) { @@ -314,18 +325,19 @@ void _sourceSerialize( writer.writeString(offsets[19], object.lang); writer.writeBool(offsets[20], object.lastUsed); writer.writeString(offsets[21], object.name); + writer.writeString(offsets[22], object.notes); writer.writeObject( - offsets[22], + offsets[23], allOffsets, RepoSchema.serialize, object.repo, ); - writer.writeString(offsets[23], object.sourceCode); - writer.writeByte(offsets[24], object.sourceCodeLanguage.index); - writer.writeString(offsets[25], object.sourceCodeUrl); - writer.writeString(offsets[26], object.typeSource); - writer.writeString(offsets[27], object.version); - writer.writeString(offsets[28], object.versionLast); + writer.writeString(offsets[24], object.sourceCode); + writer.writeByte(offsets[25], object.sourceCodeLanguage.index); + writer.writeString(offsets[26], object.sourceCodeUrl); + writer.writeString(offsets[27], object.typeSource); + writer.writeString(offsets[28], object.version); + writer.writeString(offsets[29], object.versionLast); } Source _sourceDeserialize( @@ -358,19 +370,20 @@ Source _sourceDeserialize( lang: reader.readStringOrNull(offsets[19]), lastUsed: reader.readBoolOrNull(offsets[20]), name: reader.readStringOrNull(offsets[21]), + notes: reader.readStringOrNull(offsets[22]), repo: reader.readObjectOrNull( - offsets[22], + offsets[23], RepoSchema.deserialize, allOffsets, ), - sourceCode: reader.readStringOrNull(offsets[23]), - sourceCodeUrl: reader.readStringOrNull(offsets[25]), - typeSource: reader.readStringOrNull(offsets[26]), - version: reader.readStringOrNull(offsets[27]), - versionLast: reader.readStringOrNull(offsets[28]), + sourceCode: reader.readStringOrNull(offsets[24]), + sourceCodeUrl: reader.readStringOrNull(offsets[26]), + typeSource: reader.readStringOrNull(offsets[27]), + version: reader.readStringOrNull(offsets[28]), + versionLast: reader.readStringOrNull(offsets[29]), ); object.sourceCodeLanguage = _SourcesourceCodeLanguageValueEnumMap[ - reader.readByteOrNull(offsets[24])] ?? + reader.readByteOrNull(offsets[25])] ?? SourceCodeLanguage.dart; return object; } @@ -428,25 +441,27 @@ P _sourceDeserializeProp

( case 21: return (reader.readStringOrNull(offset)) as P; case 22: + return (reader.readStringOrNull(offset)) as P; + case 23: return (reader.readObjectOrNull( offset, RepoSchema.deserialize, allOffsets, )) as P; - case 23: - return (reader.readStringOrNull(offset)) as P; case 24: + return (reader.readStringOrNull(offset)) as P; + case 25: return (_SourcesourceCodeLanguageValueEnumMap[ reader.readByteOrNull(offset)] ?? SourceCodeLanguage.dart) as P; - case 25: - return (reader.readStringOrNull(offset)) as P; case 26: return (reader.readStringOrNull(offset)) as P; case 27: return (reader.readStringOrNull(offset)) as P; case 28: return (reader.readStringOrNull(offset)) as P; + case 29: + return (reader.readStringOrNull(offset)) as P; default: throw IsarError('Unknown property with id $propertyId'); } @@ -2418,6 +2433,152 @@ extension SourceQueryFilter on QueryBuilder { }); } + QueryBuilder notesIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'notes', + )); + }); + } + + QueryBuilder notesIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'notes', + )); + }); + } + + QueryBuilder notesEqualTo( + String? value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'notes', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder notesGreaterThan( + String? value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'notes', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder notesLessThan( + String? value, { + bool include = false, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'notes', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder notesBetween( + String? lower, + String? upper, { + bool includeLower = true, + bool includeUpper = true, + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'notes', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder notesStartsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.startsWith( + property: r'notes', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder notesEndsWith( + String value, { + bool caseSensitive = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.endsWith( + property: r'notes', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder notesContains( + String value, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.contains( + property: r'notes', + value: value, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder notesMatches( + String pattern, + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.matches( + property: r'notes', + wildcard: pattern, + caseSensitive: caseSensitive, + )); + }); + } + + QueryBuilder notesIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'notes', + value: '', + )); + }); + } + + QueryBuilder notesIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + property: r'notes', + value: '', + )); + }); + } + QueryBuilder repoIsNull() { return QueryBuilder.apply(this, (query) { return query.addFilterCondition(const FilterCondition.isNull( @@ -3497,6 +3658,18 @@ extension SourceQuerySortBy on QueryBuilder { }); } + QueryBuilder sortByNotes() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'notes', Sort.asc); + }); + } + + QueryBuilder sortByNotesDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'notes', Sort.desc); + }); + } + QueryBuilder sortBySourceCode() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'sourceCode', Sort.asc); @@ -3847,6 +4020,18 @@ extension SourceQuerySortThenBy on QueryBuilder { }); } + QueryBuilder thenByNotes() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'notes', Sort.asc); + }); + } + + QueryBuilder thenByNotesDesc() { + return QueryBuilder.apply(this, (query) { + return query.addSortBy(r'notes', Sort.desc); + }); + } + QueryBuilder thenBySourceCode() { return QueryBuilder.apply(this, (query) { return query.addSortBy(r'sourceCode', Sort.asc); @@ -4065,6 +4250,13 @@ extension SourceQueryWhereDistinct on QueryBuilder { }); } + QueryBuilder distinctByNotes( + {bool caseSensitive = true}) { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'notes', caseSensitive: caseSensitive); + }); + } + QueryBuilder distinctBySourceCode( {bool caseSensitive = true}) { return QueryBuilder.apply(this, (query) { @@ -4247,6 +4439,12 @@ extension SourceQueryProperty on QueryBuilder { }); } + QueryBuilder notesProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'notes'); + }); + } + QueryBuilder repoProperty() { return QueryBuilder.apply(this, (query) { return query.addPropertyName(r'repo'); diff --git a/lib/modules/browse/extension/widgets/create_extension.dart b/lib/modules/browse/extension/widgets/create_extension.dart index 0526c495..194a682d 100644 --- a/lib/modules/browse/extension/widgets/create_extension.dart +++ b/lib/modules/browse/extension/widgets/create_extension.dart @@ -22,6 +22,7 @@ class _CreateExtensionState extends State { String _baseUrl = ""; String _apiUrl = ""; String _iconUrl = ""; + String _notes = ""; int _sourceTypeIndex = 0; int _itemTypeIndex = 0; int _languageIndex = 0; @@ -111,6 +112,11 @@ class _CreateExtensionState extends State { _iconUrl = v; }); }), + _textEditing("notes", context, "ex: this extension requires login", (v) { + setState(() { + _notes = v; + }); + }), Padding( padding: const EdgeInsets.symmetric(horizontal: 17), child: Row( @@ -217,6 +223,7 @@ class _CreateExtensionState extends State { isActive: true, version: "0.0.1", isNsfw: false, + notes: _notes, )..sourceCodeLanguage = _sourceCodeLanguage; source = source @@ -378,7 +385,8 @@ const mangayomiSources = [{ "typeSource": "${source.typeSource}", "itemType": ${source.itemType.index}, "version": "${source.version}", - "pkgPath": "" + "pkgPath": "", + "notes": "" }]; class DefaultExtension extends MProvider { diff --git a/lib/modules/manga/detail/providers/track_state_providers.g.dart b/lib/modules/manga/detail/providers/track_state_providers.g.dart index b8dfabf0..4021f109 100644 --- a/lib/modules/manga/detail/providers/track_state_providers.g.dart +++ b/lib/modules/manga/detail/providers/track_state_providers.g.dart @@ -6,7 +6,7 @@ part of 'track_state_providers.dart'; // RiverpodGenerator // ************************************************************************** -String _$trackStateHash() => r'f8d5a962cfbff41400945c0e7140071c76fa80fd'; +String _$trackStateHash() => r'1aecb0459141daa3e44fe3bbf6b49c0992b5f8bc'; /// Copied from Dart SDK class _SystemHash { diff --git a/lib/modules/manga/download/providers/download_provider.g.dart b/lib/modules/manga/download/providers/download_provider.g.dart index e0fe6be9..36ab0d8a 100644 --- a/lib/modules/manga/download/providers/download_provider.g.dart +++ b/lib/modules/manga/download/providers/download_provider.g.dart @@ -6,7 +6,7 @@ part of 'download_provider.dart'; // RiverpodGenerator // ************************************************************************** -String _$downloadChapterHash() => r'bf43fddf83fce382ff794c688288153477f9a3aa'; +String _$downloadChapterHash() => r'd729e45de171814dada724bf6004aeca7ea85a0a'; /// Copied from Dart SDK class _SystemHash { diff --git a/lib/modules/manga/home/manga_home_screen.dart b/lib/modules/manga/home/manga_home_screen.dart index 0ffc6083..972fdc51 100644 --- a/lib/modules/manga/home/manga_home_screen.dart +++ b/lib/modules/manga/home/manga_home_screen.dart @@ -25,6 +25,7 @@ import 'package:mangayomi/modules/manga/home/widget/mangas_card_selector.dart'; import 'package:mangayomi/modules/widgets/gridview_widget.dart'; import 'package:mangayomi/modules/widgets/manga_image_card_widget.dart'; import 'package:mangayomi/utils/global_style.dart'; +import 'package:marquee/marquee.dart'; import 'package:super_sliver_list/super_sliver_list.dart'; class MangaHomeScreen extends ConsumerStatefulWidget { @@ -149,7 +150,29 @@ class _MangaHomeScreenState extends ConsumerState { }; return Scaffold( appBar: AppBar( - title: _isSearch ? null : Text('${source.name}'), + title: + _isSearch + ? null + : Column( + mainAxisAlignment: MainAxisAlignment.center, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text("${source.name}"), + source.notes != null && source.notes!.isNotEmpty + ? SizedBox( + height: 20, + child: Marquee( + text: l10n.extension_notes(source.notes!), + style: const TextStyle(fontSize: 12), + blankSpace: 40.0, + velocity: 30.0, + pauseAfterRound: const Duration(seconds: 1), + startPadding: 10.0, + ), + ) + : Container(), + ], + ), leading: !_isSearch ? null : Container(), actions: [ _isSearch diff --git a/lib/services/fetch_sources_list.dart b/lib/services/fetch_sources_list.dart index 530c26e0..1f6af705 100644 --- a/lib/services/fetch_sources_list.dart +++ b/lib/services/fetch_sources_list.dart @@ -106,6 +106,7 @@ Future _updateSource( ..sourceCodeLanguage = source.sourceCodeLanguage ..additionalParams = source.additionalParams ?? "" ..isObsolete = false + ..notes = source.notes ..repo = repo; isar.writeTxnSync(() { @@ -144,6 +145,7 @@ void _addNewSource(Source source, Ref ref, Repo? repo, ItemType itemType) { ..isFullData = source.isFullData ?? false ..appMinVerReq = source.appMinVerReq ..isObsolete = false + ..notes = source.notes ..repo = repo; isar.sources.putSync(newSource); ref diff --git a/lib/services/trackers/kitsu.g.dart b/lib/services/trackers/kitsu.g.dart index 98dec282..19daa16b 100644 --- a/lib/services/trackers/kitsu.g.dart +++ b/lib/services/trackers/kitsu.g.dart @@ -6,7 +6,7 @@ part of 'kitsu.dart'; // RiverpodGenerator // ************************************************************************** -String _$kitsuHash() => r'9a123ca11d2b9e01d7d78b75d408a9f7a7b9b4e6'; +String _$kitsuHash() => r'09e9b9599bd536b94ca24bc087c8e9310d2b9ef9'; /// Copied from Dart SDK class _SystemHash {