mirror of https://github.com/NekoX-Dev/NekoX.git
Reverse description
This commit is contained in:
parent
3146a49afd
commit
b9624d14c6
|
@ -1925,36 +1925,6 @@ public class LoginActivity extends BaseFragment implements NotificationCenter.No
|
|||
textView2.setLineSpacing(AndroidUtilities.dp(2), 1.0f);
|
||||
addView(textView2, LayoutHelper.createLinear(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT, 0, 28, 0, 10));
|
||||
|
||||
infoCell = new CheckBoxCell(context, 2);
|
||||
infoCell.setText(LocaleController.getString("UploadDeviceInfo", R.string.UploadDeviceInfo), "", uploadDeviceInfo, false);
|
||||
addView(infoCell, LayoutHelper.createLinear(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, Gravity.LEFT | Gravity.TOP));
|
||||
infoCell.setOnClickListener(new OnClickListener() {
|
||||
|
||||
private Toast visibleToast;
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (getParentActivity() == null) {
|
||||
return;
|
||||
}
|
||||
infoCell.setChecked(uploadDeviceInfo = !uploadDeviceInfo, true);
|
||||
try {
|
||||
if (visibleToast != null) {
|
||||
visibleToast.cancel();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
FileLog.e(e);
|
||||
}
|
||||
if (uploadDeviceInfo) {
|
||||
visibleToast = Toast.makeText(getParentActivity(), LocaleController.getString("UploadDeviceInfoOn", R.string.UploadDeviceInfoOn), Toast.LENGTH_SHORT);
|
||||
visibleToast.show();
|
||||
} else {
|
||||
visibleToast = Toast.makeText(getParentActivity(), LocaleController.getString("UploadDeviceInfoOff", R.string.UploadDeviceInfoOff), Toast.LENGTH_SHORT);
|
||||
visibleToast.show();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
syncCell = new CheckBoxCell(context, 2);
|
||||
syncCell.setText(LocaleController.getString("SyncContacts", R.string.SyncContacts), "", syncContacts, false);
|
||||
addView(syncCell, LayoutHelper.createLinear(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, Gravity.LEFT | Gravity.TOP));
|
||||
|
@ -1987,6 +1957,36 @@ public class LoginActivity extends BaseFragment implements NotificationCenter.No
|
|||
}
|
||||
});
|
||||
|
||||
infoCell = new CheckBoxCell(context, 2);
|
||||
infoCell.setText(LocaleController.getString("HideDevieInfo", R.string.HideDeviceInfo), "", !uploadDeviceInfo, false);
|
||||
addView(infoCell, LayoutHelper.createLinear(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, Gravity.LEFT | Gravity.TOP));
|
||||
infoCell.setOnClickListener(new OnClickListener() {
|
||||
|
||||
private Toast visibleToast;
|
||||
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (getParentActivity() == null) {
|
||||
return;
|
||||
}
|
||||
infoCell.setChecked(!(uploadDeviceInfo = !uploadDeviceInfo), true);
|
||||
try {
|
||||
if (visibleToast != null) {
|
||||
visibleToast.cancel();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
FileLog.e(e);
|
||||
}
|
||||
if (!uploadDeviceInfo) {
|
||||
visibleToast = Toast.makeText(getParentActivity(), LocaleController.getString("HideDeviceInfoOn", R.string.HideDeviceInfoOn), Toast.LENGTH_SHORT);
|
||||
visibleToast.show();
|
||||
} else {
|
||||
visibleToast = Toast.makeText(getParentActivity(), LocaleController.getString("HideDeviceInfoOff", R.string.HideDeviceInfoOff), Toast.LENGTH_SHORT);
|
||||
visibleToast.show();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
TelephonyManager tm = (TelephonyManager) ApplicationLoader.applicationContext.getSystemService(Context.TELEPHONY_SERVICE);
|
||||
if (BuildVars.DEBUG_VERSION) {
|
||||
FileLog.d("sim status = " + tm.getSimState());
|
||||
|
|
|
@ -96,7 +96,7 @@ public class NekoAccountSettingsActivity extends BaseFragment {
|
|||
getUserConfig().deviceInfo = !getUserConfig().deviceInfo;
|
||||
getUserConfig().saveConfig(true);
|
||||
if (view instanceof TextCheckCell) {
|
||||
((TextCheckCell) view).setChecked(getUserConfig().deviceInfo);
|
||||
((TextCheckCell) view).setChecked(!getUserConfig().deviceInfo);
|
||||
}
|
||||
tooltip.showWithAction(0, UndoView.ACTION_NEED_RESATRT, null, null);
|
||||
} else if (position == deleteAccountRow) {
|
||||
|
@ -275,7 +275,7 @@ public class NekoAccountSettingsActivity extends BaseFragment {
|
|||
TextCheckCell textCell = (TextCheckCell) holder.itemView;
|
||||
textCell.setEnabled(true, null);
|
||||
if (position == uploadDeviceInfoRow) {
|
||||
textCell.setTextAndCheck(LocaleController.getString("UploadDeviceInfo", R.string.UploadDeviceInfo), getUserConfig().deviceInfo, true);
|
||||
textCell.setTextAndCheck(LocaleController.getString("HideDeviceInfo", R.string.HideDeviceInfo), !getUserConfig().deviceInfo, true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -275,9 +275,8 @@
|
|||
<string name="TextReplace">Replace</string>
|
||||
<string name="ReplaceRegex">Use regex</string>
|
||||
<string name="DisableTrending">Disable Trending</string>
|
||||
<string name="UploadDeviceInfo">Upload device info</string>
|
||||
<string name="UploadDeviceInfoOn">Device info will be uploaded the second time after logging in.</string>
|
||||
<string name="UploadDeviceInfoOff">You can change this in the settings later.</string>
|
||||
|
||||
<string name="HideDeviceInfo">Hide device model</string>
|
||||
<string name="HideDeviceInfoOff">Device model will be uploaded the second time the app starts after logging in.</string>
|
||||
<string name="HideDeviceInfoOn">You can change this in the settings later.</string>
|
||||
|
||||
</resources>
|
Loading…
Reference in New Issue