Updated check update

This commit is contained in:
PeratX 2017-04-09 21:41:55 +08:00
parent 2c9d14d183
commit 1f655d87b6
3 changed files with 6 additions and 4 deletions

View File

@ -1,5 +1,7 @@
package org.itxtech.daedalus.fragment;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.preference.ListPreference;
import android.preference.Preference;
@ -47,7 +49,7 @@ public class SettingsFragment extends PreferenceFragment {
public boolean onPreferenceClick(Preference preference) {
Snackbar.make(view, R.string.notice_checking_update, Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
//TODO: async check update
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("https://github.com/iTXTech/Daedalus/releases")));
return false;
}
});

View File

@ -32,5 +32,5 @@
<string name="settings_notification">启用时显示通知</string>
<string name="settings_check_update">检查更新</string>
<string name="settings_update_summary">通过 GitHub 检查更新</string>
<string name="notice_checking_update">正在检查更新……</string>
<string name="notice_checking_update">正在前往 GitHub Releases 页面……</string>
</resources>

View File

@ -14,7 +14,7 @@
<string name="server_east_china">East China</string>
<string name="server_north_china">North China</string>
<string name="secondary_server">Secondary DNS server</string>
<string name="notice_start_test">Testing specified DNS server…</string>
<string name="notice_start_test">Testing specified DNS server </string>
<string name="action_server_test">Server test</string>
<string name="action_start_test">Start test</string>
<string name="test_domain">Test domain:</string>
@ -32,5 +32,5 @@
<string name="settings_notification">Show notification when activated</string>
<string name="settings_check_update">Check update</string>
<string name="settings_update_summary">Check update via GitHub</string>
<string name="notice_checking_update">Checking update</string>
<string name="notice_checking_update">Going to the GitHub Releases page </string>
</resources>