File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -193,6 +193,9 @@ async function requestData(update = false): Promise<void> {
193193 state . loading = false ;
194194 state . updating = false ;
195195 updateContent ( ) ;
196+ if ( ! update && isAuthenticated ( ) ) {
197+ fillUser ( ) ;
198+ }
196199 return ;
197200 } else if ( state . type === "weekly" ) {
198201 const data = await Ape . leaderboards . getWeeklyXp ( {
@@ -239,6 +242,9 @@ async function requestData(update = false): Promise<void> {
239242 state . loading = false ;
240243 state . updating = false ;
241244 updateContent ( ) ;
245+ if ( ! update && isAuthenticated ( ) ) {
246+ fillUser ( ) ;
247+ }
242248 return ;
243249 } else {
244250 // state.updating = false;
@@ -742,10 +748,6 @@ function updateContent(): void {
742748
743749 updateJumpButtons ( ) ;
744750 fillTable ( ) ;
745- if ( isAuthenticated ( ) ) {
746- //todo dont run this every time, only when new user data is fetched
747- fillUser ( ) ;
748- }
749751}
750752
751753function updateTypeButtons ( ) : void {
You can’t perform that action at this time.
0 commit comments