diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Adapters/DrawerLayoutAdapter.java b/TMessagesProj/src/main/java/org/telegram/ui/Adapters/DrawerLayoutAdapter.java index b4010dcfe7..2f00098bdb 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Adapters/DrawerLayoutAdapter.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Adapters/DrawerLayoutAdapter.java @@ -64,6 +64,8 @@ public class DrawerLayoutAdapter extends RecyclerListView.SelectionAdapter imple private SideMenultItemAnimator itemAnimator; private boolean hasGps; + public static int nkbtnNewStory = 1000; + public DrawerLayoutAdapter(Context context, SideMenultItemAnimator animator, DrawerLayoutContainer drawerLayoutContainer) { mContext = context; mDrawerLayoutContainer = drawerLayoutContainer; @@ -361,6 +363,10 @@ private void resetItems() { if (MessagesController.getInstance(UserConfig.selectedAccount).storiesEnabled()) { items.add(new Item(16, LocaleController.getString("ProfileMyStories", R.string.ProfileMyStories), R.drawable.msg_menu_stories)); showDivider = true; + + if (NaConfig.INSTANCE.getDisableDialogsFloatingButton().Bool()) { + items.add(new Item(nkbtnNewStory, LocaleController.getString("RecorderNewStory", R.string.RecorderNewStory), R.drawable.msg_menu_stories)); + } } TLRPC.TL_attachMenuBots menuBots = MediaDataController.getInstance(UserConfig.selectedAccount).getAttachMenuBots(); if (menuBots != null && menuBots.bots != null) { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/DialogsActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/DialogsActivity.java index fb1a3d636c..5986838796 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/DialogsActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/DialogsActivity.java @@ -6847,6 +6847,9 @@ public int getTopOffset(int tag) { updateVisibleRows(0, false); updateProxyButton(false, true); updateStoriesVisibility(false); + if (NaConfig.INSTANCE.getDisableDialogsFloatingButton().Bool()) { + hideFloatingButton(true); + } checkSuggestClearDatabase(); } @@ -10874,6 +10877,10 @@ public void onAnimationEnd(Animator animation) { } private void hideFloatingButton(boolean hide) { + if (NaConfig.INSTANCE.getDisableDialogsFloatingButton().Bool()) { + hide = true; + } + if (rightSlidingDialogContainer.hasFragment()) { hide = true; } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java index 4e6010f4ae..f3bd8333ef 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java @@ -695,6 +695,23 @@ public boolean drawChild(Canvas canvas, View child, long drawingTime) { args.putInt("type", MediaActivity.TYPE_STORIES); drawerLayoutContainer.closeDrawer(true); presentFragment(new MediaActivity(args, null)); + } else if (id == DrawerLayoutAdapter.nkbtnNewStory) { + final StoriesController.StoryLimit storyLimit = MessagesController.getInstance(currentAccount).getStoriesController().checkStoryLimit(); + if (storyLimit != null) { + BaseFragment fragment = actionBarLayout.getFragmentStack().get(0); + LimitReachedBottomSheet limitReachedBottomSheet = new LimitReachedBottomSheet( + fragment, + this, + storyLimit.getLimitReachedType(), + currentAccount, + null); + fragment.showDialog(limitReachedBottomSheet); + limitReachedBottomSheet.onShowPremiumScreenRunnable = () -> drawerLayoutContainer.closeDrawer(false); + return; + } + + StoryRecorder.getInstance(LaunchActivity.this, currentAccount).open(null); + drawerLayoutContainer.closeDrawer(true); } } }); diff --git a/TMessagesProj/src/main/java/tw/nekomimi/nekogram/settings/NekoGeneralSettingsActivity.java b/TMessagesProj/src/main/java/tw/nekomimi/nekogram/settings/NekoGeneralSettingsActivity.java index 0537f7b61e..307287b38c 100644 --- a/TMessagesProj/src/main/java/tw/nekomimi/nekogram/settings/NekoGeneralSettingsActivity.java +++ b/TMessagesProj/src/main/java/tw/nekomimi/nekogram/settings/NekoGeneralSettingsActivity.java @@ -203,6 +203,7 @@ public class NekoGeneralSettingsActivity extends BaseNekoXSettingsActivity { private final AbstractConfigCell header_chatblur = cellGroup.appendCell(new ConfigCellHeader(LocaleController.getString("ChatBlurAlphaValue"))); private final AbstractConfigCell chatBlurAlphaValueRow = cellGroup.appendCell(new ConfigCellCustom("ChatBlurAlphaValue", ConfigCellCustom.CUSTOM_ITEM_CharBlurAlpha, NekoConfig.forceBlurInChat.Bool())); + private final AbstractConfigCell disableDialogsFloatingButtonRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getDisableDialogsFloatingButton())); private final AbstractConfigCell divider5 = cellGroup.appendCell(new ConfigCellDivider()); private final AbstractConfigCell header6 = cellGroup.appendCell(new ConfigCellHeader(LocaleController.getString("PrivacyTitle"))); diff --git a/TMessagesProj/src/main/kotlin/xyz/nextalone/nagram/NaConfig.kt b/TMessagesProj/src/main/kotlin/xyz/nextalone/nagram/NaConfig.kt index 73b6abd5d0..eacb81cb36 100644 --- a/TMessagesProj/src/main/kotlin/xyz/nextalone/nagram/NaConfig.kt +++ b/TMessagesProj/src/main/kotlin/xyz/nextalone/nagram/NaConfig.kt @@ -524,6 +524,12 @@ object NaConfig { ConfigItem.configTypeBool, false ) + val disableDialogsFloatingButton = + addConfig( + "DisableDialogsFloatingButton", + ConfigItem.configTypeBool, + false + ) private fun addConfig( k: String, diff --git a/TMessagesProj/src/main/res/values-ar-rSA/strings_na.xml b/TMessagesProj/src/main/res/values-ar-rSA/strings_na.xml index be83c490ae..9dc70e1142 100644 --- a/TMessagesProj/src/main/res/values-ar-rSA/strings_na.xml +++ b/TMessagesProj/src/main/res/values-ar-rSA/strings_na.xml @@ -122,4 +122,5 @@ إظهار الغاز الصغير تعطيل نص أمر النقر لإرساله لمنع اللمس العرضي + تعطيل مربعات الحوار الزر العائم diff --git a/TMessagesProj/src/main/res/values-cs-rCZ/strings_na.xml b/TMessagesProj/src/main/res/values-cs-rCZ/strings_na.xml index 5bef9ac966..fae24ad83f 100644 --- a/TMessagesProj/src/main/res/values-cs-rCZ/strings_na.xml +++ b/TMessagesProj/src/main/res/values-cs-rCZ/strings_na.xml @@ -122,4 +122,5 @@ Zobrazit malý Gif Zakázat kliknutí na text příkazu pro odeslání Aby se zabránilo náhodnému dotyku + Zakázat plovoucí tlačítko dialogů diff --git a/TMessagesProj/src/main/res/values-da-rDK/strings_na.xml b/TMessagesProj/src/main/res/values-da-rDK/strings_na.xml index 6e3d8f3c09..525646d95c 100644 --- a/TMessagesProj/src/main/res/values-da-rDK/strings_na.xml +++ b/TMessagesProj/src/main/res/values-da-rDK/strings_na.xml @@ -122,4 +122,5 @@ Vis Lille Gif Deaktivér klikkommandotekst for at sende For at forhindre utilsigtet berøring + Deaktivér Dialoger Flydende Knap diff --git a/TMessagesProj/src/main/res/values-de-rDE/strings_na.xml b/TMessagesProj/src/main/res/values-de-rDE/strings_na.xml index 24c2a10373..097fba9f71 100644 --- a/TMessagesProj/src/main/res/values-de-rDE/strings_na.xml +++ b/TMessagesProj/src/main/res/values-de-rDE/strings_na.xml @@ -122,4 +122,5 @@ Kleine Gif anzeigen Deaktiviere Befehlstext zum Senden Um zufällige Berührung zu verhindern + Schwebende Dialoge deaktivieren diff --git a/TMessagesProj/src/main/res/values-el-rGR/strings_na.xml b/TMessagesProj/src/main/res/values-el-rGR/strings_na.xml index 1ad9305bfd..5154b645d9 100644 --- a/TMessagesProj/src/main/res/values-el-rGR/strings_na.xml +++ b/TMessagesProj/src/main/res/values-el-rGR/strings_na.xml @@ -122,4 +122,5 @@ Εμφάνιση Μικρού Gif Απενεργοποιήστε το κλικ στην εντολή κειμένου για αποστολή Για την πρόληψη ακούσιας αφής + Απενεργοποίηση Πλωτού Κουμπιού Dialogs diff --git a/TMessagesProj/src/main/res/values-es-rES/strings_na.xml b/TMessagesProj/src/main/res/values-es-rES/strings_na.xml index 9e04f83837..e2ad772444 100644 --- a/TMessagesProj/src/main/res/values-es-rES/strings_na.xml +++ b/TMessagesProj/src/main/res/values-es-rES/strings_na.xml @@ -122,4 +122,5 @@ Mostrar Gif pequeño Deshabilitar comando de clic para enviar Para prevenir toques accidentales + Desactivar el botón flotante de diálogos diff --git a/TMessagesProj/src/main/res/values-fi-rFI/strings_na.xml b/TMessagesProj/src/main/res/values-fi-rFI/strings_na.xml index b22fcaf589..f77d754c91 100644 --- a/TMessagesProj/src/main/res/values-fi-rFI/strings_na.xml +++ b/TMessagesProj/src/main/res/values-fi-rFI/strings_na.xml @@ -122,4 +122,5 @@ Näytä Pieni Gif Poista komennon teksti käytöstä lähettääksesi Estä vahingossa kosketus + Poista Dialogien Kelluva Painike Käytöstä diff --git a/TMessagesProj/src/main/res/values-fr-rFR/strings_na.xml b/TMessagesProj/src/main/res/values-fr-rFR/strings_na.xml index 0763ffc257..2650d2df1d 100644 --- a/TMessagesProj/src/main/res/values-fr-rFR/strings_na.xml +++ b/TMessagesProj/src/main/res/values-fr-rFR/strings_na.xml @@ -122,4 +122,5 @@ Afficher le petit Gif Désactiver le texte de la commande pour envoyer Pour éviter un toucher accidentel + Désactiver le bouton flottant des boîtes de dialogue diff --git a/TMessagesProj/src/main/res/values-it-rIT/strings_na.xml b/TMessagesProj/src/main/res/values-it-rIT/strings_na.xml index fa170b0f30..09d32c3608 100644 --- a/TMessagesProj/src/main/res/values-it-rIT/strings_na.xml +++ b/TMessagesProj/src/main/res/values-it-rIT/strings_na.xml @@ -122,4 +122,5 @@ Mostra Gif Piccolo Disabilita il clic sul testo del comando da inviare Per evitare tocchi accidentali + Disabilita Le Finestre Pulsante Fluttuante diff --git a/TMessagesProj/src/main/res/values-ja-rJP/strings_na.xml b/TMessagesProj/src/main/res/values-ja-rJP/strings_na.xml index f2e695430b..c2a153eb1a 100644 --- a/TMessagesProj/src/main/res/values-ja-rJP/strings_na.xml +++ b/TMessagesProj/src/main/res/values-ja-rJP/strings_na.xml @@ -122,4 +122,5 @@ 小さなGifを表示 送信するコマンドテキストをクリックしない 偶発的なタッチを防ぐため + ダイアログのフローティングボタンを無効化 diff --git a/TMessagesProj/src/main/res/values-nl-rNL/strings_na.xml b/TMessagesProj/src/main/res/values-nl-rNL/strings_na.xml index c83dd6624b..e8811cf3f3 100644 --- a/TMessagesProj/src/main/res/values-nl-rNL/strings_na.xml +++ b/TMessagesProj/src/main/res/values-nl-rNL/strings_na.xml @@ -122,4 +122,5 @@ Kleine Gif weergeven Schakel klik op opdracht tekst uit om te verzenden Ongewenste aanraking voorkomen + Zwevende knop dialoogknop uitschakelen diff --git a/TMessagesProj/src/main/res/values-no-rNO/strings_na.xml b/TMessagesProj/src/main/res/values-no-rNO/strings_na.xml index 8dda845a39..de58613443 100644 --- a/TMessagesProj/src/main/res/values-no-rNO/strings_na.xml +++ b/TMessagesProj/src/main/res/values-no-rNO/strings_na.xml @@ -122,4 +122,5 @@ Vis liten Gif Deaktiver komprimeringstekst for å sende Å forhindre utilsiktet berøring + Deaktiver dialoger med flytende knapp diff --git a/TMessagesProj/src/main/res/values-pl-rPL/strings_na.xml b/TMessagesProj/src/main/res/values-pl-rPL/strings_na.xml index 2d91137ad3..cb8968b9d9 100644 --- a/TMessagesProj/src/main/res/values-pl-rPL/strings_na.xml +++ b/TMessagesProj/src/main/res/values-pl-rPL/strings_na.xml @@ -122,4 +122,5 @@ Pokaż mały Gif Wyłącz tekst polecenia, aby wysłać Aby zapobiec przypadkowemu dotknięciu + Wyłącz pływający przycisk dialogów diff --git a/TMessagesProj/src/main/res/values-pt-rBR/strings_na.xml b/TMessagesProj/src/main/res/values-pt-rBR/strings_na.xml index a148972092..00751b33e5 100644 --- a/TMessagesProj/src/main/res/values-pt-rBR/strings_na.xml +++ b/TMessagesProj/src/main/res/values-pt-rBR/strings_na.xml @@ -122,4 +122,5 @@ Mostrar Pequeno Gif Desative clique no texto de comando para enviar Para prevenir toques acidentais + Desativar Botão de Diálogos Flutuantes diff --git a/TMessagesProj/src/main/res/values-pt-rPT/strings_na.xml b/TMessagesProj/src/main/res/values-pt-rPT/strings_na.xml index a148972092..00751b33e5 100644 --- a/TMessagesProj/src/main/res/values-pt-rPT/strings_na.xml +++ b/TMessagesProj/src/main/res/values-pt-rPT/strings_na.xml @@ -122,4 +122,5 @@ Mostrar Pequeno Gif Desative clique no texto de comando para enviar Para prevenir toques acidentais + Desativar Botão de Diálogos Flutuantes diff --git a/TMessagesProj/src/main/res/values-ro-rRO/strings_na.xml b/TMessagesProj/src/main/res/values-ro-rRO/strings_na.xml index cd3d0b8e9a..2edf38ea98 100644 --- a/TMessagesProj/src/main/res/values-ro-rRO/strings_na.xml +++ b/TMessagesProj/src/main/res/values-ro-rRO/strings_na.xml @@ -122,4 +122,5 @@ Arată Gif Mic Dezactivează clic pe textul de comandă pentru a trimite Pentru a preveni atingerea accidentală + Dezactivează dialogul cu butonul plutitor diff --git a/TMessagesProj/src/main/res/values-ru-rRU/strings_na.xml b/TMessagesProj/src/main/res/values-ru-rRU/strings_na.xml index 1abaab76a2..49fd08412e 100644 --- a/TMessagesProj/src/main/res/values-ru-rRU/strings_na.xml +++ b/TMessagesProj/src/main/res/values-ru-rRU/strings_na.xml @@ -122,4 +122,5 @@ Показать маленький Gif Отключите команду клика для отправки Во избежание случайного касания + Отключить плавающую кнопку диалогов diff --git a/TMessagesProj/src/main/res/values-sv-rSE/strings_na.xml b/TMessagesProj/src/main/res/values-sv-rSE/strings_na.xml index cce60c66fd..6d60110fc1 100644 --- a/TMessagesProj/src/main/res/values-sv-rSE/strings_na.xml +++ b/TMessagesProj/src/main/res/values-sv-rSE/strings_na.xml @@ -122,4 +122,5 @@ Visa liten Gif Inaktivera klickkommandotext för att skicka För att förhindra oavsiktligt tryck + Inaktivera dialoger flytande knapp diff --git a/TMessagesProj/src/main/res/values-uk-rUA/strings_na.xml b/TMessagesProj/src/main/res/values-uk-rUA/strings_na.xml index 7d37b95b75..950420834f 100644 --- a/TMessagesProj/src/main/res/values-uk-rUA/strings_na.xml +++ b/TMessagesProj/src/main/res/values-uk-rUA/strings_na.xml @@ -122,4 +122,5 @@ Показати маленький Gif Вимкнути командний текст, щоб відправити Щоб запобігти випадковому дотику + Вимкнути плаваючу кнопку діалогу diff --git a/TMessagesProj/src/main/res/values-zh-rCN/strings_na.xml b/TMessagesProj/src/main/res/values-zh-rCN/strings_na.xml index a1a9a1fb34..21794a61cf 100644 --- a/TMessagesProj/src/main/res/values-zh-rCN/strings_na.xml +++ b/TMessagesProj/src/main/res/values-zh-rCN/strings_na.xml @@ -122,4 +122,5 @@ GIF 显示得更小 禁用点击指令文本发送 妈妈再也不用担心我会误触啦 + 禁用主页浮动按钮 diff --git a/TMessagesProj/src/main/res/values-zh-rTW/strings_na.xml b/TMessagesProj/src/main/res/values-zh-rTW/strings_na.xml index 72c11fb322..0bf77dbb99 100644 --- a/TMessagesProj/src/main/res/values-zh-rTW/strings_na.xml +++ b/TMessagesProj/src/main/res/values-zh-rTW/strings_na.xml @@ -122,4 +122,5 @@ Show Small Gif Disable click command text to send To prevent accidental touch + Disable Dialogs Floating Button diff --git a/TMessagesProj/src/main/res/values/strings_na.xml b/TMessagesProj/src/main/res/values/strings_na.xml index a47eb98dbe..38824ecc1f 100644 --- a/TMessagesProj/src/main/res/values/strings_na.xml +++ b/TMessagesProj/src/main/res/values/strings_na.xml @@ -122,4 +122,5 @@ Show Small Gif Disable click command text to send To prevent accidental touch + Disable Dialogs Floating Button