small bugfixes

This commit is contained in:
Laura Hausmann 2019-12-12 19:11:31 +01:00
parent 21220e978e
commit 58bab110cb
Signed by: zotan
GPG key ID: 5EC1D38FFC321311
3 changed files with 6 additions and 5 deletions

View file

@ -174,6 +174,8 @@ namespace telegram
}
var message = command.Substring(split[0].Length);
if (string.IsNullOrWhiteSpace(message))
return;
EditMessage(message, lastMessage);
}

View file

@ -2,7 +2,6 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using NeoSmart.Unicode;
using static TdLib.TdApi;
using static telegram.tgcli;

View file

@ -20,14 +20,14 @@ namespace telegram
* make Util.getActualStringWidth better
* make the command system not shit (classes & manager & /help etc)
* refactor everything
* publish AUR package
* add option to disable terminal bell
* command /s /search -> list matching chats, option 1-n, archived indicator
* secret chats!
* split with newline if received message enters next line
* fix issues when current_input message is longer than term width (only show as much as fits?)
* photo/document/etc captions
* photo download & show externally
* secret chats!
* publish AUR package
* maybe cursor input nav (cmd+del, left/right, up for last inputs, etc)
*/
@ -144,12 +144,12 @@ namespace telegram
ScreenUpdate();
break;
case Td.TdApi.ConnectionState.ConnectionStateReady _:
connectionState = "Ready";
if (!authorized) return;
messageQueue.Add($"{Ansi.Yellow}[tgcli] Connected.");
Task.Run(() =>
{
Command.ParseCommand("u");
connectionState = "Ready";
ScreenUpdate();
});
ScreenUpdate();
@ -182,7 +182,7 @@ namespace telegram
messageQueue.Clear();
var status = GetFormattedStatus(currentUserRead);
Console.Write(prefix
+ (connectionState == "Ready" ? "" : $" ({connectionState})")
+ (connectionState == "Ready" ? "" : $" | {connectionState}")
+ (currentChatUserId != 0 ? status : "]") + " > " + currentInputLine);
}
}