Skip to content

Commit

Permalink
feat: Disable flip avatars by tapping
Browse files Browse the repository at this point in the history
  • Loading branch information
omg-xtao committed Feb 10, 2024
1 parent cc7fb3c commit 20ea927
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import java.util.ArrayList;

import tw.nekomimi.nekogram.NekoConfig;
import xyz.nextalone.nagram.NaConfig;

public class ProfileGalleryView extends CircularViewPager implements NotificationCenter.NotificationCenterDelegate {

Expand Down Expand Up @@ -1229,7 +1230,7 @@ public void onAnimationReady(ImageReceiver imageReceiver) {

item.imageView.setRoundRadius(roundTopRadius, roundTopRadius, roundBottomRadius, roundBottomRadius);

if (NekoConfig.disablePhotoSideAction.Bool()) {
if (NaConfig.INSTANCE.getDisableClickProfileGalleryView().Bool()) {
item.imageView.setOnClickListener(__ -> callback.onClick());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ public class NekoChatSettingsActivity extends BaseNekoXSettingsActivity implemen
private final AbstractConfigCell disableTrendingRow = cellGroup.appendCell(new ConfigCellTextCheck(NekoConfig.disableTrending));
private final AbstractConfigCell disableSwipeToNextRow = cellGroup.appendCell(new ConfigCellTextCheck(NekoConfig.disableSwipeToNext));
private final AbstractConfigCell disablePhotoSideActionRow = cellGroup.appendCell(new ConfigCellTextCheck(NekoConfig.disablePhotoSideAction));
private final AbstractConfigCell disableClickProfileGalleryViewRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getDisableClickProfileGalleryView()));
private final AbstractConfigCell disableRemoteEmojiInteractionsRow = cellGroup.appendCell(new ConfigCellTextCheck(NekoConfig.disableRemoteEmojiInteractions));
private final AbstractConfigCell rememberAllBackMessagesRow = cellGroup.appendCell(new ConfigCellTextCheck(NekoConfig.rememberAllBackMessages));
// private final AbstractConfigCell reactionsRow = cellGroup.appendCell(new ConfigCellSelectBox(null, NekoConfig.reactions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,6 +506,12 @@ object NaConfig {
ConfigItem.configTypeBool,
false
)
val disableClickProfileGalleryView =
addConfig(
"DisableClickProfileGalleryView",
ConfigItem.configTypeBool,
false
)

private fun addConfig(
k: String,
Expand Down
1 change: 1 addition & 0 deletions TMessagesProj/src/main/res/values-zh-rCN/strings_na.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,4 +109,5 @@
<string name="ProviderTranSmartTranslate">腾讯交互翻译</string>
<string name="DisableMarkdown">禁用 Markdown</string>
<string name="SendWithMarkdown">启用 Markdown</string>
<string name="DisableClickProfileGalleryView">禁用点按切换头像</string>
</resources>
1 change: 1 addition & 0 deletions TMessagesProj/src/main/res/values/strings_na.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,5 @@
<string name="ProviderTranSmartTranslate">TranSmart Translator</string>
<string name="DisableMarkdown">Disable Markdown</string>
<string name="SendWithMarkdown">Send with markdown</string>
<string name="DisableClickProfileGalleryView">Disable flip avatars by tapping</string>
</resources>

0 comments on commit 20ea927

Please sign in to comment.