diff --git a/lib/pages/article_page.dart b/lib/pages/article_page.dart index f9f1d6e..34310a0 100644 --- a/lib/pages/article_page.dart +++ b/lib/pages/article_page.dart @@ -95,6 +95,9 @@ class ArticlePageState extends State { await Future.delayed(Duration(milliseconds: 300)); } setState(() { loaded = true; }); + if (_target == SourceOpenTarget.Local || _target == SourceOpenTarget.FullContent) { + navigated = true; + } } void _onWebpageReady(_) { if (loaded) navigated = true; diff --git a/lib/pages/settings/services/feedbin_page.dart b/lib/pages/settings/services/feedbin_page.dart index 17562f3..e1ed9c0 100644 --- a/lib/pages/settings/services/feedbin_page.dart +++ b/lib/pages/settings/services/feedbin_page.dart @@ -32,6 +32,7 @@ class _FeedbinPageState extends State { S.of(context).endpoint, Utils.testUrl, initialValue: _endpoint, + inputType: TextInputType.url, ), )); if (endpoint == null) return; @@ -55,7 +56,7 @@ class _FeedbinPageState extends State { builder: (context) => TextEditorPage( S.of(context).password, Utils.notEmpty, - isPassword: true, + inputType: TextInputType.visiblePassword, ), )); if (password == null) return; diff --git a/lib/pages/settings/services/fever_page.dart b/lib/pages/settings/services/fever_page.dart index 827c8e4..c3e3454 100644 --- a/lib/pages/settings/services/fever_page.dart +++ b/lib/pages/settings/services/fever_page.dart @@ -34,6 +34,7 @@ class _FeverPageState extends State { S.of(context).endpoint, Utils.testUrl, initialValue: _endpoint, + inputType: TextInputType.url, ), )); if (endpoint == null) return; @@ -57,7 +58,7 @@ class _FeverPageState extends State { builder: (context) => TextEditorPage( S.of(context).password, Utils.notEmpty, - isPassword: true, + inputType: TextInputType.visiblePassword, ), )); if (password == null) return; diff --git a/lib/pages/settings/services/greader_page.dart b/lib/pages/settings/services/greader_page.dart index 25f8fbc..32ebfec 100644 --- a/lib/pages/settings/services/greader_page.dart +++ b/lib/pages/settings/services/greader_page.dart @@ -33,6 +33,7 @@ class _GReaderPageState extends State { S.of(context).endpoint, Utils.testUrl, initialValue: _endpoint, + inputType: TextInputType.url, ), )); if (endpoint == null) return; @@ -56,7 +57,7 @@ class _GReaderPageState extends State { builder: (context) => TextEditorPage( S.of(context).password, Utils.notEmpty, - isPassword: true, + inputType: TextInputType.visiblePassword, ), )); if (password == null) return; diff --git a/lib/pages/settings/services/inoreader_page.dart b/lib/pages/settings/services/inoreader_page.dart index 8df5c12..e05237a 100644 --- a/lib/pages/settings/services/inoreader_page.dart +++ b/lib/pages/settings/services/inoreader_page.dart @@ -55,7 +55,7 @@ class _InoreaderPageState extends State { builder: (context) => TextEditorPage( S.of(context).password, Utils.notEmpty, - isPassword: true, + inputType: TextInputType.visiblePassword, ), )); if (password == null) return; @@ -68,6 +68,7 @@ class _InoreaderPageState extends State { "API ID", Utils.notEmpty, initialValue: _apiId, + inputType: TextInputType.number, ), )); if (apiId == null) return; diff --git a/lib/pages/settings/text_editor_page.dart b/lib/pages/settings/text_editor_page.dart index 6d55b71..faed129 100644 --- a/lib/pages/settings/text_editor_page.dart +++ b/lib/pages/settings/text_editor_page.dart @@ -11,7 +11,7 @@ class TextEditorPage extends StatefulWidget { final String initialValue; final Color navigationBarColor; final FutureOr Function(String) validate; - final bool isPassword; + final TextInputType inputType; TextEditorPage( this.title, @@ -20,7 +20,7 @@ class TextEditorPage extends StatefulWidget { this.navigationBarColor, this.saveText, this.initialValue: "", - this.isPassword: false, + this.inputType, Key key, }) : super(key: key); @@ -88,8 +88,8 @@ class _TextEditorPage extends State { clearButtonMode: OverlayVisibilityMode.editing, readOnly: _validating, autofocus: true, - obscureText: widget.isPassword, - keyboardType: widget.isPassword ? TextInputType.visiblePassword : null, + obscureText: widget.inputType == TextInputType.visiblePassword, + keyboardType: widget.inputType, onSubmitted: (v) { _onSave(); }, ), ]),