How to show back button?
See original GitHub issueHi again,
I can’t see the back button in the sub-menu:
const config = new TelegrafInlineMenu("Configuration")
config.setCommand('config');
//Available languages
const locales = new TelegrafInlineMenu("Locales");
locales.simpleButton("italian", 'SET_LOCALE_IT', {
doFunc: async ctx => settingsController.SetLocale(ctx, bot)
});
locales.simpleButton("english", 'SET_LOCALE_EN', {
doFunc: async ctx => settingsController.SetLocale(ctx, bot)
});
config.submenu("Set locale", 's', locales);
bot.use(config.init({
backButtonText: "back...",
mainMenuButtonText: "Go to main menu",
}));
When I press on Set Locale
I get:
- Italian
- English
- Go to main menu
but the back button missing… what I did wrong?
Thanks in advnance
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
How To Get The BACK Button On Your Android Phone
1) Tap the Settings icon on your phone. It can be found in your app list. · 2) Once in the Settings area,...
Read more >Display back button on action bar - android - Stack Overflow
Step 1 showing back button: Add this line in onCreate() method to show back button. assert getSupportActionBar() != null; //null check getSupportActionBar() ...
Read more >How to Add and Customize Back Button of Action Bar in ...
Create action bar variable and call function getSupportActionBar() in the java/kotlin file. · Show back button using actionBar.
Read more >How To Get The Back Button BACK in Android 12
Go To Settings > System; Inside System, Locate The 3 Button Navigation Switch To Turn on Android's Standard Navigation Buttons; Once Selected, ...
Read more >How to bring back Android's 3-button navigation
Swipe right quickly and briefly on the Home button to switch between your two most recent apps (the same as double-tapping the Overview...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@EdJoPaTo Thanks for your support and congrats for this helpful library 😃
The init is only required once per menu “tree”: Having two separate menus you need to init both. If one is a submenu of the other one, you only need to init it once.
And to your other question: Commands can be on every menu wherever they are in a menu tree. So this is possible:
This way you can either use /start and go to the submenu with a button or use /config (as a shortcut). This is especially handy for things like /help or /settings.