Exemplo n.º 1
0
    public void HeartSelected()
    {
        if (!m_user.IsLoggedIn())
        {
            m_loginFlow.OpenCloseSwitch();
            return;
        }

        m_heartOn  = !m_heartOn;
        m_numLikes = m_heartOn ? m_numLikes + 1 : m_numLikes - 1;

        m_heartObject.GetComponentInChildren <SelectedButton>().ButtonSelected(m_heartOn);
        m_likesObject.GetComponentInChildren <Text>().text = m_numLikes.ToString();
        m_posts.LikeOrUnlikePost(m_imageIdentifier, m_heartOn);
    }
Exemplo n.º 2
0
    public void OpenUserProfile()
    {
        if (m_user.IsLoggedIn())
        {
            m_userId = m_user.m_id;
            m_handle = m_user.m_handle;

            m_appDirector.RequestProfileState();

            OpenProfileInternal();
        }
        else
        {
            m_loginFlow.OpenCloseSwitch();
        }
    }
Exemplo n.º 3
0
    public void OptionsSelected()
    {
        m_keyboard.AcceptText();
        if (!m_user.IsLoggedIn())
        {
            Close();
            m_loginFlow.OpenCloseSwitch();
            return;
        }

        if (m_currImageSphere.IsLoggedUserImage())
        {
            SetImageFlowPage(5);
        }
        else
        {
            SetImageFlowPage(6);
        }
    }
Exemplo n.º 4
0
    public void FollowSelected(int userResultItemIndex)
    {
        if (!m_user.IsLoggedIn())
        {
            CloseListUsers();
            m_loginFlow.OpenCloseSwitch();
            return;
        }

        int actualResultIndex = m_currResultIndex + userResultItemIndex;

        m_userResults[actualResultIndex].followedByMe = !m_userResults[actualResultIndex].followedByMe;
        m_displayItems[userResultItemIndex].GetComponentInChildren <FollowButton>().FollowOnOffSwitch(m_userResults[actualResultIndex].followedByMe);
        FollowOrUnfollowUser(m_userResults[actualResultIndex].userId, m_userResults[actualResultIndex].followedByMe);
    }
Exemplo n.º 5
0
    public void OpenCloseSwitch()
    {
        if (!m_optionsOpen)
        {
            if (!m_user.IsLoggedIn())
            {
                m_loginFlow.OpenCloseSwitch();
                return;
            }

            OpenOptions();
        }
        else
        {
            CloseOptions();
        }
    }
Exemplo n.º 6
0
    public void RequestFollowingState()
    {
        if (!m_user.IsLoggedIn())
        {
            m_loginFlow.OpenCloseSwitch();
            return;
        }

        if (Debug.isDebugBuild)
        {
            Debug.Log("------- VREEL: RequestFollowingState() called");
        }
        if (m_appState != AppState.kFollowing)
        {
            SetFollowingState();
        }
    }