diff options
Diffstat (limited to 'indra/newview/llpanelavatar.h')
-rw-r--r-- | indra/newview/llpanelavatar.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/indra/newview/llpanelavatar.h b/indra/newview/llpanelavatar.h index f73ea0643d..fb9ff26ca6 100644 --- a/indra/newview/llpanelavatar.h +++ b/indra/newview/llpanelavatar.h @@ -117,36 +117,38 @@ public: /*virtual*/ ~LLPanelProfileTab(); - void setEmbedded(bool embedded) { mEmbedded = embedded; } - protected: LLPanelProfileTab(); + enum ELoadingState + { + PROFILE_INIT, + PROFILE_LOADING, + PROFILE_LOADED, + }; + // mLoading: false: Initial state, can request // true: Data requested, skip duplicate requests (happens due to LLUI's habit of repeated callbacks) // mLoaded: false: Initial state, show loading indicator // true: Data recieved, which comes in a single message, hide indicator - bool getIsLoading() { return mLoading; } - void setIsLoading() { mLoading = true; } - bool getIsLoaded() { return mLoaded; } - void resetLoading() { mLoading = false; mLoaded = false; } + ELoadingState getLoadingState() { return mLoadingState; } + void setIsLoading() { mLoadingState = PROFILE_LOADING; } + virtual void setLoaded(); + void resetLoading() { mLoadingState = PROFILE_INIT; } - const bool getEmbedded() const { return mEmbedded; } + bool getStarted() { return mLoadingState != PROFILE_INIT; } + bool getIsLoaded() { return mLoadingState == PROFILE_LOADED; } const bool getSelfProfile() const { return mSelfProfile; } void setApplyProgress(bool started); - virtual void updateButtons(); - private: LLUUID mAvatarId; - bool mLoading; - bool mLoaded; - bool mEmbedded; + ELoadingState mLoadingState; bool mSelfProfile; }; |