add server version to settings

closes sk22#376
This commit is contained in:
sk 2023-01-26 15:01:41 +01:00
parent 4cbc1e3664
commit 2a6115f6d9
2 changed files with 3 additions and 0 deletions

View File

@ -9,6 +9,7 @@ import android.graphics.Canvas;
import android.graphics.Rect;
import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.LruCache;
import android.util.TypedValue;
import android.view.Gravity;
@ -269,6 +270,7 @@ public class SettingsFragment extends MastodonToolbarFragment{
items.add(new TextItem(R.string.settings_tos, ()->UiUtils.launchWebBrowser(getActivity(), "https://"+session.domain+"/terms"), R.drawable.ic_fluent_open_24_regular));
items.add(new TextItem(R.string.settings_privacy_policy, ()->UiUtils.launchWebBrowser(getActivity(), "https://"+session.domain+"/terms"), R.drawable.ic_fluent_open_24_regular));
items.add(new TextItem(R.string.log_out, this::confirmLogOut, R.drawable.ic_fluent_sign_out_24_regular));
if (!TextUtils.isEmpty(instance.version)) items.add(new SmallTextItem(getString(R.string.sk_settings_server_version, instance.version)));
items.add(new HeaderItem(R.string.sk_instance_features));
items.add(new SwitchItem(R.string.sk_settings_support_local_only, 0, GlobalUserPreferences.accountsWithLocalOnlySupport.contains(accountID), i->{

View File

@ -249,4 +249,5 @@
<string name="sk_reported">reported</string>
<string name="sk_sign_ups">Users signing up</string>
<string name="sk_new_reports">New reports</string>
<string name="sk_settings_server_version">Server version: %s</string>
</resources>