diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-04-16 01:01:01 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-04-16 01:01:01 +0300 |
commit | c9b83e8117026aa7fc70da3972049152a669b0fc (patch) | |
tree | ced3d08d70d22b03022e884121056faa13b2a524 /indra/newview/llpanelavatar.h | |
parent | 3678678506d9d026ebdb88d3775920e6b0b32f8a (diff) |
SL-15312 Legacy profiles remake #8
Progress indicators, loading states and 'embedded' cleanup
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; }; |