webapp: When the user switches to display a different repository, that repository becomes the default repository to be displayed next time the webapp gets started.

This commit is contained in:
Joey Hess 2013-06-11 00:06:06 -04:00
parent 768f7c87f2
commit 680d3b5120
3 changed files with 7 additions and 1 deletions

View file

@ -36,7 +36,9 @@ modifyAutoStartFile func = do
createDirectoryIfMissing True (parentDir f)
viaTmp writeFile f $ unlines $ dirs'
{- Adds a directory to the autostart file. -}
{- Adds a directory to the autostart file. If the directory is already
- present, it's moved to the top, so it will be used as the default
- when opening the webapp. -}
addAutoStartFile :: FilePath -> IO ()
addAutoStartFile path = modifyAutoStartFile $ (:) path