package Ġio . g rim locations . ui . view model . reducer Ċ Ċ import Ġio . g rim locations . data . dto . first Container Ċ import Ġio . g rim locations . data . repo . action . get Meta Async Ċ import Ġio . g rim locations . data . repo . action . get Profiles Mods Diff icult ies Async Ċ import Ġio . g rim locations . data . repo . action . persist Active PMD Async Ċ import Ġio . g rim locations . data . repo . create Locations FromFile Ċ import Ġio . g rim locations . data . repo . write Locations ToFile Ċ import Ġio . g rim locations . framework . ui . getState Ċ import Ġio . g rim locations . framework . ui . setState Ċ import Ġio . g rim locations . framework . util . await All Ċ import Ġio . g rim locations . framework . util . extension . endsWith One Ċ import Ġio . g rim locations . ui . GL StateManager Ċ import Ġio . g rim locations . ui . view model . state . Active Chooser State Ċ import Ġorg . apache . logging . log 4 j . Log Manager Ċ import Ġorg . apache . logging . log 4 j . Logger Ċ import Ġjava . io . File Ċ Ċ private Ġval Ġlogger : ĠLogger Ġ= ĠLog Manager . getLogger () Ċ Ċ @ Suppress (" UN CHECK ED _ CAST ") Ċ suspend Ġfun ĠGL StateManager . load Active Chooser State () Ġ{ ĊĠĠĠ Ġval Ġ( map , Ġmeta ) Ġ= Ġawait All ( ĊĠĠĠĠĠĠĠ Ġrepository . get Profiles Mods Diff icult ies Async ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġinclude Reserved Profiles Ġ= Ġfalse ĊĠĠĠĠĠĠĠ Ġ), ĊĠĠĠĠĠĠĠ Ġrepository . get Meta Async () ĊĠĠĠ Ġ) ĊĊĠĠĠ ĠsetState ( ĊĠĠĠĠĠĠĠ ĠActive Chooser State ( ĊĠĠĠĠĠĠĠĠĠĠĠ Ġmap Ġ= Ġmap , ĊĠĠĠĠĠĠĠĠĠĠĠ Ġselected Ġ= Ġmeta . active PMD Ġ?: Ġmap . first Container (), ĊĠĠĠĠĠĠĠ Ġ) ĊĠĠĠ Ġ) Ċ } Ċ Ċ suspend Ġfun ĠGL StateManager . update Active Chooser State ( state : ĠActive Chooser State ) Ġ{ ĊĠĠĠ ĠsetState ( state ) Ċ } Ċ Ċ suspend Ġfun ĠGL StateManager . persist Active PMD () Ġ{ ĊĠĠĠ Ġval Ġs Ġ= ĠgetState < Active Chooser State >() ĊĠĠĠ Ġrepository . persist Active PMD Async ( s . selected ). await () Ċ } ĊĊ Ċ suspend Ġfun ĠGL StateManager . writeTo Locations File (): ĠString ? Ġ{ ĊĠĠĠ Ġval Ġmeta Ġ= Ġrepository . get Meta Async (). await () ĊĠĠĠ Ġmeta . install Location ?. also Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġs Ġ= ĠgetState < Active Chooser State >() ĊĠĠĠĠĠĠĠ Ġreturn Ġif Ġ( it . endsWith One ("/", Ġ"\ \" )) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġrepository . write Locations ToFile ( File ( it Ġ+ Ġ" G rim Internals _ Teleport List . txt "), Ġs . selected ) ĊĠĠĠĠĠĠĠ Ġelse ĊĠĠĠĠĠĠĠĠĠĠĠ Ġrepository . write Locations ToFile ( File ( it Ġ+ ĠFile . separator Ġ+ Ġ" G rim Internals _ Teleport List . txt "), Ġs . selected ) ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġreturn Ġ" GD Ġinstall Ġlocation Ġneeds Ġto Ġbe Ġset ." Ċ }