Ejemplo n.º 1
0
        private async Task StartLoadingPrevTweets()
        {
            Status status = DisplayTweet.Model;

            IsLoadingPrevious = true;
            while (true)
            {
                if (status.InReplyToStatusID == 0)
                {
                    break;
                }

                var inReplyTo = await Context.Twitter.Statuses.GetTweet(status.InReplyToStatusID, true);

                if (inReplyTo == null)
                {
                    break;
                }

                var vm = new StatusViewModel(inReplyTo, Context, Configuration, ViewServiceRepository);

                await Dispatcher.RunAsync(() => PreviousConversationTweets.Insert(0, vm));

                RaisePropertyChanged(nameof(PreviousConversationTweets));

                status = inReplyTo;
            }

            await Task.WhenAll(PreviousConversationTweets.Select(s => s.LoadQuotedTweet()));

            IsLoadingPrevious = false;
        }
Ejemplo n.º 2
0
        private async Task LoadQuotedTweet()
        {
            var quoteId = ExtractQuotedTweetUrl();

            if (quoteId != 0)
            {
                var quoted = await Context.Twitter.Statuses.GetTweet(quoteId, true);

                if (quoted != null)
                {
                    QuotedTweet = new StatusViewModel(quoted, Context, Config, ViewServiceRepository);
                }
            }
        }
Ejemplo n.º 3
0
 public void SetReply(StatusViewModel status, bool toAll)
 {
     InReplyTo  = status;
     ReplyToAll = toAll;
 }