|
|
@ -1,7 +1,7 @@ |
|
|
|
part of 'neon_news.dart'; |
|
|
|
part of 'neon_news.dart'; |
|
|
|
|
|
|
|
|
|
|
|
class NewsAppSpecificOptions extends NextcloudAppOptions { |
|
|
|
class NewsAppSpecificOptions extends NextcloudAppOptions { |
|
|
|
NewsAppSpecificOptions(super.storage, final NeonPlatform platform) { |
|
|
|
NewsAppSpecificOptions(super.storage, this._platform) { |
|
|
|
super.categories = [ |
|
|
|
super.categories = [ |
|
|
|
generalCategory, |
|
|
|
generalCategory, |
|
|
|
articlesCategory, |
|
|
|
articlesCategory, |
|
|
@ -21,18 +21,10 @@ class NewsAppSpecificOptions extends NextcloudAppOptions { |
|
|
|
feedsSortPropertyOption, |
|
|
|
feedsSortPropertyOption, |
|
|
|
feedsSortBoxOrderOption, |
|
|
|
feedsSortBoxOrderOption, |
|
|
|
]; |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
|
|
articleViewTypeOption.values = { |
|
|
|
|
|
|
|
ArticleViewType.direct: (final context) => AppLocalizations.of(context).optionsArticleViewTypeDirect, |
|
|
|
|
|
|
|
if (platform.canUseWebView) ...{ |
|
|
|
|
|
|
|
ArticleViewType.internalBrowser: (final context) => |
|
|
|
|
|
|
|
AppLocalizations.of(context).optionsArticleViewTypeInternalBrowser, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
ArticleViewType.externalBrowser: (final context) => |
|
|
|
|
|
|
|
AppLocalizations.of(context).optionsArticleViewTypeExternalBrowser, |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
final NeonPlatform _platform; |
|
|
|
|
|
|
|
|
|
|
|
final generalCategory = OptionsCategory( |
|
|
|
final generalCategory = OptionsCategory( |
|
|
|
name: (final context) => AppLocalizations.of(context).general, |
|
|
|
name: (final context) => AppLocalizations.of(context).general, |
|
|
|
); |
|
|
|
); |
|
|
@ -68,7 +60,14 @@ class NewsAppSpecificOptions extends NextcloudAppOptions { |
|
|
|
key: 'article-view-type', |
|
|
|
key: 'article-view-type', |
|
|
|
label: (final context) => AppLocalizations.of(context).optionsArticleViewType, |
|
|
|
label: (final context) => AppLocalizations.of(context).optionsArticleViewType, |
|
|
|
defaultValue: ArticleViewType.direct, |
|
|
|
defaultValue: ArticleViewType.direct, |
|
|
|
values: {}, |
|
|
|
values: { |
|
|
|
|
|
|
|
ArticleViewType.direct: (final context) => AppLocalizations.of(context).optionsArticleViewTypeDirect, |
|
|
|
|
|
|
|
if (_platform.canUseWebView) |
|
|
|
|
|
|
|
ArticleViewType.internalBrowser: (final context) => |
|
|
|
|
|
|
|
AppLocalizations.of(context).optionsArticleViewTypeInternalBrowser, |
|
|
|
|
|
|
|
ArticleViewType.externalBrowser: (final context) => |
|
|
|
|
|
|
|
AppLocalizations.of(context).optionsArticleViewTypeExternalBrowser, |
|
|
|
|
|
|
|
}, |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
late final articleDisableMarkAsReadTimeoutOption = ToggleOption( |
|
|
|
late final articleDisableMarkAsReadTimeoutOption = ToggleOption( |
|
|
|