forked from cybrespace/pinafore
		
	precache user account
This commit is contained in:
		
							parent
							
								
									bdcfea32e7
								
							
						
					
					
						commit
						9492ff4022
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -53,6 +53,7 @@
 | 
			
		|||
  import Layout from '../../_components/Layout.html';
 | 
			
		||||
  import SettingsLayout from '../_components/SettingsLayout.html'
 | 
			
		||||
  import { registerApplication, generateAuthLink, getAccessTokenFromAuthCode } from '../../_utils/mastodon/oauth'
 | 
			
		||||
  import { getThisUserAccount } from '../../_utils/mastodon/user'
 | 
			
		||||
  import { store } from '../../_utils/store'
 | 
			
		||||
  import { goto } from 'sapper/runtime.js'
 | 
			
		||||
  import { switchToTheme } from '../../_utils/themeEngine'
 | 
			
		||||
| 
						 | 
				
			
			@ -157,6 +158,8 @@
 | 
			
		|||
        })
 | 
			
		||||
        this.store.save()
 | 
			
		||||
        switchToTheme('default')
 | 
			
		||||
        // fire off request for account so it's cached in the SW
 | 
			
		||||
        getThisUserAccount(currentRegisteredInstanceName, instanceData.access_token)
 | 
			
		||||
        goto('/')
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue