Small readability improvements
This commit is contained in:
parent
5f49e25458
commit
84d18f6f45
@ -199,7 +199,7 @@ namespace TelegramBotBase.Controls.Hybrid
|
|||||||
if (!result.IsFirstHandler)
|
if (!result.IsFirstHandler)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (result.MessageText == null)
|
if (result.MessageText == null || result.MessageText == "")
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var button = HeadLayoutButtonRow?.FirstOrDefault(a => a.Text.Trim() == result.MessageText)
|
var button = HeadLayoutButtonRow?.FirstOrDefault(a => a.Text.Trim() == result.MessageText)
|
||||||
@ -328,16 +328,16 @@ namespace TelegramBotBase.Controls.Hybrid
|
|||||||
|
|
||||||
public async override Task Action(MessageResult result, string value = null)
|
public async override Task Action(MessageResult result, string value = null)
|
||||||
{
|
{
|
||||||
//Find clicked button depending on Text or Value (depending on markup type)
|
|
||||||
if (this.KeyboardType != eKeyboardType.InlineKeyBoard)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (result.Handled)
|
if (result.Handled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!result.IsFirstHandler)
|
if (!result.IsFirstHandler)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
//Find clicked button depending on Text or Value (depending on markup type)
|
||||||
|
if (this.KeyboardType != eKeyboardType.InlineKeyBoard)
|
||||||
|
return;
|
||||||
|
|
||||||
await result.ConfirmAction(this.ConfirmationText ?? "");
|
await result.ConfirmAction(this.ConfirmationText ?? "");
|
||||||
|
|
||||||
var button = HeadLayoutButtonRow?.FirstOrDefault(a => a.Value == result.RawData)
|
var button = HeadLayoutButtonRow?.FirstOrDefault(a => a.Value == result.RawData)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user