Example #1
0
        protected override async Task OnLoadStateAsync(LoadStateEventArgs e, bool isFirstRun)
        {
            if (isFirstRun)
            {
                if (this.ViewParameter is string && !this.ViewParameter.ToString().Equals(this.Item?.ID, StringComparison.CurrentCultureIgnoreCase))
                {
                    await this.RefreshAsync();

                    if (this.Item != null)
                    {
                        var jump = new Services.JumpItemInfo();
                        jump.Arguments = this.Item.ID;
                        jump.GroupName = Strings.Resources.TextRecent;
                        jump.Name      = this.Item.Title;
                        jump.Logo      = new Uri(this.Item.ImageThumbLandscapeSmall, UriKind.Absolute);
                        await Platform.Current.Jumplist.AddItemAsync(jump);
                    }
                }
            }

            await base.OnLoadStateAsync(e, isFirstRun);
        }
Example #2
0
        protected override async Task OnLoadStateAsync(LoadStateEventArgs e, bool isFirstRun)
        {
            if (isFirstRun)
            {
                if (this.ViewParameter is string && !this.ViewParameter.ToString().Equals(this.Item?.ID, StringComparison.CurrentCultureIgnoreCase))
                {
                    await this.RefreshAsync();

                    if (this.Item != null)
                    {
                        var jump = new Services.JumpItemInfo();
                        jump.Arguments = this.Item.ID;
                        jump.GroupName = Strings.Resources.TextRecent;
                        jump.Name = this.Item.Title;
                        jump.Logo = new Uri(this.Item.ImageThumbLandscapeSmall, UriKind.Absolute);
                        await Platform.Current.Jumplist.AddItemAsync(jump);
                    }
                }
            }

            await base.OnLoadStateAsync(e, isFirstRun);
        }