public void Handle(TLUpdateUserTyping update) { var user = CacheService.GetUser(update.UserId) as TLUser; if (user != null && !user.IsSelf) { _typingManagers.TryGetValue(update.UserId, out InputTypingManager typingManager); if (typingManager == null) { typingManager = new InputTypingManager(users => { user.TypingSubtitle = DialogViewModel.GetTypingString(user.ToPeer(), users, CacheService.GetUser, null); user.IsTyping = true; }, () => { user.TypingSubtitle = null; user.IsTyping = false; }); _typingManagers[update.UserId] = typingManager; } var action = update.Action; if (action is TLSendMessageCancelAction) { typingManager.RemoveTypingUser(update.UserId); return; } typingManager.AddTypingUser(update.UserId, action); } }
public void Handle(TLUpdateUserTyping userTyping) { var user = With as TLUserBase; if (user != null && user.Index == userTyping.UserId.Value) { HandleTypingCommon(userTyping); } }
public void Handle(TLUpdateUserTyping userTyping) { var user = this.With as TLUser; if (user != null && !user.IsSelf && user.Id == userTyping.UserId) { var action = userTyping.Action; if (action is TLSendMessageCancelAction) { InputTypingManager.RemoveTypingUser(userTyping.UserId); return; } InputTypingManager.AddTypingUser(userTyping.UserId, action); } }
public void Handle(TLUpdateUserTyping userTyping) { HandleTypingCommon(userTyping, _userTypingCache); }