示例#1
0
    // Token: 0x06006108 RID: 24840 RVA: 0x00223CC0 File Offset: 0x002220C0
    public void SetupElement(ApiNotification n, QuickMenuSocialElement.IconType icon = QuickMenuSocialElement.IconType.None)
    {
        APIUser cachedUser = APIUser.GetCachedUser(n.senderUserId);

        if (cachedUser != null)
        {
            this.SetupElement(cachedUser, QuickMenuSocialElement.IconType.None);
            this.SetIcon(icon, cachedUser.id);
            this.notification = n;
            this.elementType  = QuickMenuSocialElement.ElementType.Notification;
        }
        else
        {
            APIUser.Fetch(n.senderUserId, delegate(APIUser user)
            {
                this.SetupElement(user, QuickMenuSocialElement.IconType.None);
                this.SetIcon(icon, user.id);
                this.notification = n;
                this.elementType  = QuickMenuSocialElement.ElementType.Notification;
            }, delegate(string obj)
            {
                Debug.LogError(obj);
            });
        }
    }