Skip to content

Commit c919c17

Browse files
authored
Merge pull request #12 from yang991178/1.0.1
Version 1.0.1
2 parents c0d14ef + 438ed4c commit c919c17

29 files changed

+499
-52
lines changed

android/app/src/main/AndroidManifest.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,16 @@
4141
<action android:name="android.intent.action.MAIN"/>
4242
<category android:name="android.intent.category.LAUNCHER"/>
4343
</intent-filter>
44+
45+
<intent-filter>
46+
<action android:name="android.intent.action.VIEW" />
47+
<category android:name="android.intent.category.DEFAULT" />
48+
<category android:name="android.intent.category.BROWSABLE" />
49+
<!-- Accepts URIs that begin with YOUR_SCHEME://YOUR_HOST -->
50+
<data
51+
android:scheme="fluent-reader"
52+
android:host="import" />
53+
</intent-filter>
4454
</activity>
4555
<!-- Don't delete the meta-data below.
4656
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->

assets/article/article.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,4 +126,8 @@ article ul, article menu, article dir {
126126
}
127127
article li {
128128
overflow: visible;
129+
}
130+
article pre {
131+
white-space: pre-wrap;
132+
word-break: break-all;
129133
}

assets/article/article.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<head>
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1">
6+
<meta name="referrer" content="no-referrer">
67
<meta http-equiv="Content-Security-Policy"
78
content="default-src 'none'; script-src 'self'; img-src http: https: data:; style-src 'self' 'unsafe-inline'; frame-src http: https:; media-src http: https:; connect-src https: http:">
89
<title>Article</title>

ios/Podfile.lock

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ PODS:
1414
- sqflite (0.0.2):
1515
- Flutter
1616
- FMDB (>= 2.7.5)
17+
- uni_links (0.0.1):
18+
- Flutter
1719
- url_launcher (0.0.1):
1820
- Flutter
1921
- webview_flutter (0.0.1):
@@ -26,6 +28,7 @@ DEPENDENCIES:
2628
- share (from `.symlinks/plugins/share/ios`)
2729
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
2830
- sqflite (from `.symlinks/plugins/sqflite/ios`)
31+
- uni_links (from `.symlinks/plugins/uni_links/ios`)
2932
- url_launcher (from `.symlinks/plugins/url_launcher/ios`)
3033
- webview_flutter (from `.symlinks/plugins/webview_flutter/ios`)
3134

@@ -46,6 +49,8 @@ EXTERNAL SOURCES:
4649
:path: ".symlinks/plugins/shared_preferences/ios"
4750
sqflite:
4851
:path: ".symlinks/plugins/sqflite/ios"
52+
uni_links:
53+
:path: ".symlinks/plugins/uni_links/ios"
4954
url_launcher:
5055
:path: ".symlinks/plugins/url_launcher/ios"
5156
webview_flutter:
@@ -59,6 +64,7 @@ SPEC CHECKSUMS:
5964
share: 0b2c3e82132f5888bccca3351c504d0003b3b410
6065
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
6166
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
67+
uni_links: d97da20c7701486ba192624d99bffaaffcfc298a
6268
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
6369
webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96
6470

ios/Runner/Info.plist

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5-
<key>ITSAppUsesNonExemptEncryption</key>
6-
<false/>
75
<key>CFBundleDevelopmentRegion</key>
86
<string>$(DEVELOPMENT_LANGUAGE)</string>
97
<key>CFBundleDisplayName</key>
@@ -22,8 +20,23 @@
2220
<string>$(FLUTTER_BUILD_NAME)</string>
2321
<key>CFBundleSignature</key>
2422
<string>????</string>
23+
<key>CFBundleURLTypes</key>
24+
<array>
25+
<dict>
26+
<key>CFBundleTypeRole</key>
27+
<string>Editor</string>
28+
<key>CFBundleURLName</key>
29+
<string>me.hyliu.fluent-reader-lite</string>
30+
<key>CFBundleURLSchemes</key>
31+
<array>
32+
<string>fluent-reader</string>
33+
</array>
34+
</dict>
35+
</array>
2536
<key>CFBundleVersion</key>
2637
<string>$(FLUTTER_BUILD_NUMBER)</string>
38+
<key>ITSAppUsesNonExemptEncryption</key>
39+
<false/>
2740
<key>LSRequiresIPhoneOS</key>
2841
<true/>
2942
<key>NSAppTransportSecurity</key>

lib/l10n/intl_en.arb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,9 @@
8787
"wentWrong": "Something went wrong.",
8888
"retry": "Retry",
8989
"copy": "Copy",
90-
"errorLog": "Error log"
90+
"errorLog": "Error log",
91+
"unreadSourceTip": "You can long press on the title of this page to toggle between all and unread subscriptions.",
92+
"uncategorized": "Uncategorized",
93+
"showUncategorized": "Show uncategorized",
94+
"serviceExists": "A service already exists. Please log out before importing."
9195
}

lib/l10n/intl_zh.arb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,9 @@
8787
"wentWrong": "发生错误",
8888
"retry": "重试",
8989
"copy": "复制",
90-
"errorLog": "错误日志"
90+
"errorLog": "错误日志",
91+
"unreadSourceTip": "您可以长按此页面的标题来切换全部订阅源或仅未读订阅源。",
92+
"uncategorized": "未分组",
93+
"showUncategorized": "显示“未分组”",
94+
"serviceExists": "已登录至一个服务,请在导入前登出。"
9195
}

lib/models/groups_model.dart

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,44 @@
1+
import 'package:fluent_reader_lite/utils/global.dart';
12
import 'package:fluent_reader_lite/utils/store.dart';
23
import 'package:flutter/cupertino.dart';
34

45
class GroupsModel with ChangeNotifier {
56
Map<String, List<String>> _groups = Store.getGroups();
7+
List<String> uncategorized = Store.getUncategorized();
68

79
Map<String, List<String>> get groups => _groups;
810
set groups(Map<String, List<String>> groups) {
911
_groups = groups;
12+
updateUncategorized();
1013
notifyListeners();
1114
Store.setGroups(groups);
1215
}
16+
17+
void updateUncategorized({force: false}) {
18+
if (uncategorized != null || force) {
19+
final sids = Set<String>.from(
20+
Global.sourcesModel.getSources().map<String>((s) => s.id)
21+
);
22+
for (var group in _groups.values) {
23+
for (var sid in group) {
24+
sids.remove(sid);
25+
}
26+
}
27+
uncategorized = sids.toList();
28+
Store.setUncategorized(uncategorized);
29+
}
30+
}
31+
32+
bool get showUncategorized => uncategorized != null;
33+
set showUncategorized(bool value) {
34+
if (showUncategorized != value) {
35+
if (value) {
36+
updateUncategorized(force: true);
37+
} else {
38+
uncategorized = null;
39+
Store.setUncategorized(null);
40+
}
41+
notifyListeners();
42+
}
43+
}
1344
}

lib/models/service.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
import 'package:fluent_reader_lite/models/item.dart';
22
import 'package:fluent_reader_lite/models/source.dart';
3+
import 'package:fluent_reader_lite/utils/global.dart';
4+
import 'package:fluent_reader_lite/utils/store.dart';
35
import 'package:tuple/tuple.dart';
46

57
enum SyncService {
68
None, Fever, Feedbin, GReader, Inoreader
79
}
810

911
abstract class ServiceHandler {
10-
void remove();
12+
void remove() {
13+
Store.sp.remove(StoreKeys.SYNC_SERVICE);
14+
Global.groupsModel.groups = Map();
15+
Global.groupsModel.showUncategorized = false;
16+
}
1117
Future<bool> validate();
1218
Future<void> reauthenticate() async { }
1319
Future<Tuple2<List<RSSSource>, Map<String, List<String>>>> getSources();

lib/models/services/feedbin.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class FeedbinServiceHandler extends ServiceHandler {
4949

5050
@override
5151
void remove() {
52-
Store.sp.remove(StoreKeys.SYNC_SERVICE);
52+
super.remove();
5353
Store.sp.remove(StoreKeys.ENDPOINT);
5454
Store.sp.remove(StoreKeys.USERNAME);
5555
Store.sp.remove(StoreKeys.PASSWORD);

0 commit comments

Comments
 (0)