fix login
This commit is contained in:
parent
f567aad5dd
commit
c37b6091a7
|
@ -121,7 +121,7 @@
|
||||||
<workItem from="1575536474314" duration="39215000" />
|
<workItem from="1575536474314" duration="39215000" />
|
||||||
<workItem from="1575724030612" duration="6335000" />
|
<workItem from="1575724030612" duration="6335000" />
|
||||||
<workItem from="1575806456895" duration="35215000" />
|
<workItem from="1575806456895" duration="35215000" />
|
||||||
<workItem from="1576149306510" duration="923000" />
|
<workItem from="1576149306510" duration="1602000" />
|
||||||
</task>
|
</task>
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
|
|
|
@ -247,21 +247,24 @@ namespace telegram
|
||||||
}, ctsTyping.Token);
|
}, ctsTyping.Token);
|
||||||
typingTask.Start();
|
typingTask.Start();
|
||||||
break;
|
break;
|
||||||
case Td.TdApi.Update.UpdateConnectionState state :
|
case Td.TdApi.Update.UpdateConnectionState state:
|
||||||
switch (state.State)
|
switch (state.State)
|
||||||
{
|
{
|
||||||
case Td.TdApi.ConnectionState.ConnectionStateConnecting _:
|
case Td.TdApi.ConnectionState.ConnectionStateConnecting _:
|
||||||
connectionState = "Connecting";
|
connectionState = "Connecting";
|
||||||
|
if (!authorized) return;
|
||||||
messageQueue.Add($"{Ansi.Yellow}[tgcli] Connecting to Telegram servers...");
|
messageQueue.Add($"{Ansi.Yellow}[tgcli] Connecting to Telegram servers...");
|
||||||
ScreenUpdate();
|
ScreenUpdate();
|
||||||
break;
|
break;
|
||||||
case Td.TdApi.ConnectionState.ConnectionStateConnectingToProxy _:
|
case Td.TdApi.ConnectionState.ConnectionStateConnectingToProxy _:
|
||||||
connectionState = "Connecting";
|
connectionState = "Connecting";
|
||||||
|
if (!authorized) return;
|
||||||
messageQueue.Add($"{Ansi.Yellow}[tgcli] Connecting to Proxy...");
|
messageQueue.Add($"{Ansi.Yellow}[tgcli] Connecting to Proxy...");
|
||||||
ScreenUpdate();
|
ScreenUpdate();
|
||||||
break;
|
break;
|
||||||
case Td.TdApi.ConnectionState.ConnectionStateReady _:
|
case Td.TdApi.ConnectionState.ConnectionStateReady _:
|
||||||
connectionState = "Ready";
|
connectionState = "Ready";
|
||||||
|
if (!authorized) return;
|
||||||
messageQueue.Add($"{Ansi.Yellow}[tgcli] Connected.");
|
messageQueue.Add($"{Ansi.Yellow}[tgcli] Connected.");
|
||||||
Task.Run(() =>
|
Task.Run(() =>
|
||||||
{
|
{
|
||||||
|
@ -272,11 +275,13 @@ namespace telegram
|
||||||
break;
|
break;
|
||||||
case Td.TdApi.ConnectionState.ConnectionStateUpdating _:
|
case Td.TdApi.ConnectionState.ConnectionStateUpdating _:
|
||||||
connectionState = "Updating";
|
connectionState = "Updating";
|
||||||
|
if (!authorized) return;
|
||||||
messageQueue.Add($"{Ansi.Yellow}[tgcli] Updating message cache...");
|
messageQueue.Add($"{Ansi.Yellow}[tgcli] Updating message cache...");
|
||||||
ScreenUpdate();
|
ScreenUpdate();
|
||||||
break;
|
break;
|
||||||
case Td.TdApi.ConnectionState.ConnectionStateWaitingForNetwork _:
|
case Td.TdApi.ConnectionState.ConnectionStateWaitingForNetwork _:
|
||||||
connectionState = "Waiting for Network";
|
connectionState = "Waiting for Network";
|
||||||
|
if (!authorized) return;
|
||||||
messageQueue.Add($"{Ansi.Yellow}[tgcli] Lost connection. Waiting for network...");
|
messageQueue.Add($"{Ansi.Yellow}[tgcli] Lost connection. Waiting for network...");
|
||||||
ScreenUpdate();
|
ScreenUpdate();
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue