Skip to content

Commit 2d16983

Browse files
committed
Minor fixes
1 parent 7ecf758 commit 2d16983

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

android/app/src/main/kotlin/com/invertedx/sentinelx/channel/ApiChannel.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import com.invertedx.sentinelx.SentinelxApp
66
import com.invertedx.sentinelx.api.ApiService
77
import com.invertedx.sentinelx.d
88
import com.invertedx.sentinelx.e
9+
import com.invertedx.sentinelx.utils.SentinalPrefs
910
import io.flutter.plugin.common.MethodCall
1011
import io.flutter.plugin.common.MethodChannel
1112
import io.reactivex.android.schedulers.AndroidSchedulers
@@ -138,6 +139,10 @@ class ApiChannel(private val applicationContext: Context) : MethodChannel.Method
138139
result.notImplemented()
139140
return
140141
}
142+
if(SentinalPrefs(applicationContext).dojoUrl == null){
143+
SentinalPrefs(applicationContext).dojoUrl = url
144+
SentinalPrefs(applicationContext).dojoKey = apiKey
145+
}
141146
ApiService(applicationContext).authenticate(url, apiKey)
142147
.subscribeOn(Schedulers.io())
143148
.observeOn(AndroidSchedulers.mainThread())

lib/screens/settings/update_screen.dart

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class _UpdateCheckState extends State<UpdateCheck> {
5151
Divider(),
5252
ListTile(
5353
onTap: this.checkVersion,
54-
title: Text("Check for Update"),
54+
title: Text("Check for update"),
5555
subtitle: Text("This action will use github api to check new releases", style: Theme.of(context).textTheme.caption),
5656
),
5757
Divider(),
@@ -73,29 +73,33 @@ class _UpdateCheckState extends State<UpdateCheck> {
7373
});
7474
},
7575
),
76-
subtitle: Text(
77-
"Show notification when new update released.\n"
78-
"note: app will only check updates every start up",
79-
style: Theme.of(context).textTheme.caption),
76+
subtitle: Padding(
77+
padding: const EdgeInsets.only(top: 8),
78+
child: Text(
79+
"Show notification when new update released.\n"
80+
"note: The app will check updates during the startup",
81+
style: Theme.of(context).textTheme.caption),
82+
),
8083
),
8184
Divider(),
8285
ListTile(
8386
onTap: () async {
8487
await SystemChannel().openURL("https://github.com/InvertedX/sentinelx");
8588
},
8689
title: Text(
87-
"Open Github Repo",
90+
"Open Github repo",
8891
style: Theme.of(context).textTheme.subhead,
8992
),
9093
subtitle: Text("github.com/InvertedX/sentinelx", style: Theme.of(context).textTheme.caption),
9194
),
95+
Divider(),
9296
(changeLog.isNotEmpty && downloadAssets.length == 0)
9397
? ListTile(
9498
onTap: () async {
9599
this.showChangeLog(version);
96100
},
97101
title: Text(
98-
"Show Change Log",
102+
"Show current change log",
99103
style: Theme.of(context).textTheme.subhead,
100104
),
101105
subtitle: Text("View current change log", style: Theme.of(context).textTheme.caption),

0 commit comments

Comments
 (0)