Exemple #1
0
        public void EditChannelAboutAsync(TLChannel channel, TLString about, System.Action callback)
        {
            if (TLString.Equals(about, channel.About, StringComparison.Ordinal))
            {
                callback.SafeInvoke();
                return;
            }

            IsWorking = true;
            MTProtoService.EditAboutAsync(channel, about,
                                          statedMessage => Execute.BeginOnUIThread(() =>
            {
                IsWorking = false;

                channel.About = about;
                CacheService.Commit();

                callback.SafeInvoke();
            }),
                                          error => Execute.BeginOnUIThread(() =>
            {
                Execute.ShowDebugMessage("channels.editAbout error " + error);

                IsWorking = false;

                if (error.CodeEquals(ErrorCode.BAD_REQUEST) &&
                    error.TypeEquals(ErrorType.CHAT_ABOUT_NOT_MODIFIED))
                {
                }
                callback.SafeInvoke();
            }));
        }