Procházet zdrojové kódy

[Telegram] Sort version in keyboard for SubCategory

Slava Barinov před 2 roky
rodič
revize
cffd470839
1 změnil soubory, kde provedl 3 přidání a 1 odebrání
  1. 3 1
      src/telegram.rs

+ 3 - 1
src/telegram.rs

@@ -441,7 +441,7 @@ async fn handle_category(
         ))
     })?;
 
-    let accounts = user
+    let mut accounts = user
         .accounts
         .iter()
         .filter(|&e| {
@@ -449,6 +449,8 @@ async fn handle_category(
         })
         .collect::<Vec<_>>();
 
+    accounts.sort_unstable();
+
     if accounts.is_empty() {
         bot.send_message(msg.chat.id, format!("Input subcategory for {}", item))
             .await?;