mirror of https://github.com/NekoX-Dev/NekoX.git
Improve join date
This commit is contained in:
parent
f67ff8fea5
commit
ca13a7f054
|
@ -302,7 +302,7 @@ android {
|
|||
}
|
||||
}
|
||||
|
||||
defaultConfig.versionCode = 10 * 1857
|
||||
defaultConfig.versionCode = 10 * 1858
|
||||
|
||||
applicationVariants.all { variant ->
|
||||
variant.outputs.all { output ->
|
||||
|
|
|
@ -19,7 +19,7 @@ public class BuildVars {
|
|||
public static boolean USE_CLOUD_STRINGS = true;
|
||||
public static boolean CHECK_UPDATES = true;
|
||||
public static boolean TON_WALLET_STANDALONE = false;
|
||||
public static int BUILD_VERSION = 1857;
|
||||
public static int BUILD_VERSION = 1858;
|
||||
public static String BUILD_VERSION_STRING = "5.14.0.4";
|
||||
public static int APP_ID = 336779; //obtain your own APP_ID at https://core.telegram.org/api/obtaining_api_id
|
||||
public static String APP_HASH = "b91eefacc86747c068c8d8a16b41500d"; //obtain your own APP_HASH at https://core.telegram.org/api/obtaining_api_id
|
||||
|
|
|
@ -10973,7 +10973,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
|||
getMessagesController().loadChannelParticipants(currentChat.id);
|
||||
}
|
||||
}
|
||||
if ((NekoConfig.showJoinDate || chatFull.participants == null) && chatInfo != null) {
|
||||
if (chatFull.participants == null && chatInfo != null) {
|
||||
chatFull.participants = chatInfo.participants;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1090,7 +1090,7 @@ public class ChatRightsEditActivity extends BaseFragment {
|
|||
} else if (participant instanceof TLRPC.TL_chatChannelParticipant) {
|
||||
status = LocaleController.formatDateJoined(((TLRPC.TL_chatChannelParticipant) participant).date);
|
||||
}
|
||||
userCell2.setData(currentUser, null, NekoConfig.showJoinDate ? status : null, 0);
|
||||
userCell2.setData(currentUser, null, status, 0);
|
||||
break;
|
||||
case 1:
|
||||
TextInfoPrivacyCell privacyCell = (TextInfoPrivacyCell) holder.itemView;
|
||||
|
|
|
@ -2596,7 +2596,7 @@ public class ChatUsersActivity extends BaseFragment implements NotificationCente
|
|||
}
|
||||
userCell.setData(user, null, role, position != lastRow - 1);
|
||||
} else if (type == TYPE_USERS) {
|
||||
userCell.setData(user, null, NekoConfig.showJoinDate ? joinDate : null, position != lastRow - 1);
|
||||
userCell.setData(user, null, joinDate, position != lastRow - 1);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -4291,7 +4291,6 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
|||
}
|
||||
if (part != null) {
|
||||
String role;
|
||||
String joinDate;
|
||||
if (part instanceof TLRPC.TL_chatChannelParticipant) {
|
||||
TLRPC.ChannelParticipant channelParticipant = ((TLRPC.TL_chatChannelParticipant) part).channelParticipant;
|
||||
if (!TextUtils.isEmpty(channelParticipant.rank)) {
|
||||
|
@ -4305,11 +4304,6 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
|||
role = null;
|
||||
}
|
||||
}
|
||||
if (channelParticipant instanceof TLRPC.TL_channelParticipantCreator) {
|
||||
joinDate = LocaleController.getString("ChannelCreator", R.string.ChannelCreator);
|
||||
} else {
|
||||
joinDate = LocaleController.formatDateJoined(part.date);
|
||||
}
|
||||
} else {
|
||||
if (part instanceof TLRPC.TL_chatParticipantCreator) {
|
||||
role = LocaleController.getString("ChannelCreator", R.string.ChannelCreator);
|
||||
|
@ -4318,14 +4312,9 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
|||
} else {
|
||||
role = null;
|
||||
}
|
||||
if (part instanceof TLRPC.TL_chatParticipantCreator) {
|
||||
joinDate = LocaleController.getString("ChannelCreator", R.string.ChannelCreator);
|
||||
} else {
|
||||
joinDate = LocaleController.formatDateJoined(part.date);
|
||||
}
|
||||
}
|
||||
userCell.setAdminRole(role);
|
||||
userCell.setData(MessagesController.getInstance(currentAccount).getUser(part.user_id), null, NekoConfig.showJoinDate ? joinDate : null, 0, position != membersEndRow - 1);
|
||||
userCell.setData(MessagesController.getInstance(currentAccount).getUser(part.user_id), null, null, 0, position != membersEndRow - 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ public class NekoConfig {
|
|||
public static int mapPreviewProvider = 0;
|
||||
public static boolean transparentStatusBar = false;
|
||||
public static boolean residentNotification = false;
|
||||
public static boolean showJoinDate = false;
|
||||
public static boolean hideProxySponsorChannel = false;
|
||||
public static boolean saveCacheToPrivateDirectory = Build.VERSION.SDK_INT >= 24;
|
||||
public static float stickerSize = 14.0f;
|
||||
|
@ -80,7 +79,6 @@ public class NekoConfig {
|
|||
editor.putBoolean("fireworks", fireworks);
|
||||
editor.putFloat("stickerSize", stickerSize);
|
||||
editor.putBoolean("unlimitedFavedStickers", unlimitedFavedStickers);
|
||||
editor.putBoolean("showJoinDate", showJoinDate);
|
||||
|
||||
editor.commit();
|
||||
} catch (Exception e) {
|
||||
|
@ -122,7 +120,6 @@ public class NekoConfig {
|
|||
fireworks = preferences.getBoolean("fireworks", false);
|
||||
stickerSize = preferences.getFloat("stickerSize", 14.0f);
|
||||
unlimitedFavedStickers = preferences.getBoolean("unlimitedFavedStickers", false);
|
||||
showJoinDate = preferences.getBoolean("showJoinDate", false);
|
||||
configLoaded = true;
|
||||
}
|
||||
}
|
||||
|
@ -342,12 +339,4 @@ public class NekoConfig {
|
|||
editor.commit();
|
||||
}
|
||||
|
||||
public static void toggleShowJoinDate() {
|
||||
showJoinDate = !showJoinDate;
|
||||
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("nekoconfig", Activity.MODE_PRIVATE);
|
||||
SharedPreferences.Editor editor = preferences.edit();
|
||||
editor.putBoolean("showJoinDate", showJoinDate);
|
||||
editor.commit();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -74,7 +74,6 @@ public class NekoSettingsActivity extends BaseFragment {
|
|||
private int inappCameraRow;
|
||||
private int useSystemEmojiRow;
|
||||
private int ignoreBlockedRow;
|
||||
private int showJoinDateRow;
|
||||
private int mapPreviewRow;
|
||||
private int stickerSizeRow;
|
||||
private int messageMenuRow;
|
||||
|
@ -177,11 +176,6 @@ public class NekoSettingsActivity extends BaseFragment {
|
|||
if (view instanceof TextCheckCell) {
|
||||
((TextCheckCell) view).setChecked(NekoConfig.ignoreBlocked);
|
||||
}
|
||||
} else if (position == showJoinDateRow) {
|
||||
NekoConfig.toggleShowJoinDate();
|
||||
if (view instanceof TextCheckCell) {
|
||||
((TextCheckCell) view).setChecked(NekoConfig.showJoinDate);
|
||||
}
|
||||
} else if (position == transparentStatusBarRow) {
|
||||
NekoConfig.toggleTransparentStatusBar();
|
||||
if (view instanceof TextCheckCell) {
|
||||
|
@ -415,7 +409,6 @@ public class NekoSettingsActivity extends BaseFragment {
|
|||
inappCameraRow = rowCount++;
|
||||
useSystemEmojiRow = rowCount++;
|
||||
ignoreBlockedRow = rowCount++;
|
||||
showJoinDateRow = rowCount++;
|
||||
hideProxySponsorChannelRow = rowCount++;
|
||||
saveCacheToPrivateDirectoryRow = Build.VERSION.SDK_INT >= 24 ? rowCount++ : -1;
|
||||
mapPreviewRow = rowCount++;
|
||||
|
@ -830,8 +823,6 @@ public class NekoSettingsActivity extends BaseFragment {
|
|||
textCell.setTextAndCheck(LocaleController.getString("TypefaceUseDefault", R.string.TypefaceUseDefault), NekoConfig.typeface == 1, true);
|
||||
} else if (position == ignoreBlockedRow) {
|
||||
textCell.setTextAndCheck(LocaleController.getString("IgnoreBlocked", R.string.IgnoreBlocked), NekoConfig.ignoreBlocked, true);
|
||||
} else if (position == showJoinDateRow) {
|
||||
textCell.setTextAndCheck(LocaleController.getString("ShowJoinDate", R.string.ShowJoinDate), NekoConfig.showJoinDate, true);
|
||||
} else if (position == forceTabletRow) {
|
||||
textCell.setTextAndCheck(LocaleController.getString("ForceTabletMode", R.string.ForceTabletMode), NekoConfig.forceTablet, true);
|
||||
} else if (position == xmasRow) {
|
||||
|
@ -876,7 +867,7 @@ public class NekoSettingsActivity extends BaseFragment {
|
|||
@Override
|
||||
public boolean isEnabled(RecyclerView.ViewHolder holder) {
|
||||
int position = holder.getAdapterPosition();
|
||||
return position == hidePhoneRow || position == inappCameraRow || position == ignoreBlockedRow || position == showJoinDateRow ||
|
||||
return position == hidePhoneRow || position == inappCameraRow || position == ignoreBlockedRow ||
|
||||
position == useSystemEmojiRow || position == ipv6Row || position == typefaceRow || position == nameOrderRow ||
|
||||
position == forceTabletRow || position == mapPreviewRow || position == xmasRow || position == newYearRow ||
|
||||
position == newYearEveRow || position == fireworksRow || position == transparentStatusBarRow ||
|
||||
|
@ -930,7 +921,7 @@ public class NekoSettingsActivity extends BaseFragment {
|
|||
return 2;
|
||||
} else if (position == ipv6Row || position == hidePhoneRow || position == inappCameraRow ||
|
||||
position == transparentStatusBarRow || position == hideProxySponsorChannelRow ||
|
||||
position == ignoreBlockedRow || position == showJoinDateRow || position == useSystemEmojiRow || position == typefaceRow ||
|
||||
position == ignoreBlockedRow || position == useSystemEmojiRow || position == typefaceRow ||
|
||||
position == forceTabletRow || position == xmasRow || position == newYearRow || position == newYearEveRow ||
|
||||
position == fireworksRow || position == saveCacheToPrivateDirectoryRow || position == unlimitedFavedStickersRow ||
|
||||
position == disableFilteringRow) {
|
||||
|
|
|
@ -66,6 +66,5 @@
|
|||
<string name="ServiceByGoogle">Translation service is provided by Google</string>
|
||||
<string name="JoinedFormatted">joined %1$s</string>
|
||||
<string name="JoinedDateFormatted">joined on %1$s</string>
|
||||
<string name="ShowJoinDate">Display join date of group members</string>
|
||||
<string name="DeleteAccount">Delete Telegram account</string>
|
||||
</resources>
|
Loading…
Reference in New Issue