diff options
-rw-r--r-- | Assistant/Threads/WebApp.hs | 2 | ||||
-rw-r--r-- | Command/WebApp.hs | 16 | ||||
-rw-r--r-- | debian/changelog | 2 | ||||
-rw-r--r-- | doc/bugs/Open_webapp_ask_to_create_new_repo___40__on_first_start__41___even_if_repo_exists_on_Android.mdwn | 2 |
4 files changed, 18 insertions, 4 deletions
diff --git a/Assistant/Threads/WebApp.hs b/Assistant/Threads/WebApp.hs index 0a1a2c0f7..0fb038b6a 100644 --- a/Assistant/Threads/WebApp.hs +++ b/Assistant/Threads/WebApp.hs @@ -51,7 +51,7 @@ webAppThread -> UrlRenderer -> Bool -> Maybe HostName - -> Maybe (IO String) + -> Maybe (IO Url) -> Maybe (Url -> FilePath -> IO ()) -> NamedThread webAppThread assistantdata urlrenderer noannex listenhost postfirstrun onstartup = thread $ liftIO $ do diff --git a/Command/WebApp.hs b/Command/WebApp.hs index 52042321f..eeb23a164 100644 --- a/Command/WebApp.hs +++ b/Command/WebApp.hs @@ -157,15 +157,25 @@ firstRun listenhost = do Annex.eval state $ startDaemon True True listenhost $ Just $ sendurlback v - sendurlback v _origout _origerr url _htmlshim = putMVar v url + sendurlback v _origout _origerr url _htmlshim = do + recordUrl url + putMVar v url + +recordUrl :: String -> IO () +#ifdef __ANDROID__ +{- The Android app has a menu item that opens the url recorded + - in this file. -} +recordUrl url = writeFile "/sdcard/git-annex.home/.git-annex-url" url +#else +recordUrl _ = noop +#endif openBrowser :: Maybe FilePath -> FilePath -> String -> Maybe Handle -> Maybe Handle -> IO () #ifndef __ANDROID__ openBrowser mcmd htmlshim _realurl outh errh = runbrowser #else openBrowser mcmd htmlshim realurl outh errh = do - {- The Android app has a menu item that opens this file. -} - writeFile "/sdcard/git-annex.home/.git-annex-url" url + recordUrl url {- Android's `am` command does not work reliably across the - wide range of Android devices. Intead, FIFO should be set to - the filename of a fifo that we can write the URL to. -} diff --git a/debian/changelog b/debian/changelog index 72526499e..d9c1f798d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ git-annex (4.20130602) UNRELEASED; urgency=low symlinks and other POSIX filesystem features. * Android: Add .thumbnails to .gitignore when setting up a camera repository. + * Android: Make the "Open webapp" menu item open the just created + repository when a new repo is made. -- Joey Hess <joeyh@debian.org> Mon, 10 Jun 2013 12:52:44 -0400 diff --git a/doc/bugs/Open_webapp_ask_to_create_new_repo___40__on_first_start__41___even_if_repo_exists_on_Android.mdwn b/doc/bugs/Open_webapp_ask_to_create_new_repo___40__on_first_start__41___even_if_repo_exists_on_Android.mdwn index 6d430ce02..8d1d3e8ec 100644 --- a/doc/bugs/Open_webapp_ask_to_create_new_repo___40__on_first_start__41___even_if_repo_exists_on_Android.mdwn +++ b/doc/bugs/Open_webapp_ask_to_create_new_repo___40__on_first_start__41___even_if_repo_exists_on_Android.mdwn @@ -36,3 +36,5 @@ add Camera/IMG_20130223_111411.jpg (checksum...) ok [...] [2013-06-01 17:14:17 EDT] Committer: Committing changes to git """]] + +> [[fixed|done]] --[[Joey]] |