diff options
author | Jeffrey Armstrong <jeff@approximatrix.com> | 2020-08-11 11:18:40 -0400 |
---|---|---|
committer | Jeffrey Armstrong <jeff@approximatrix.com> | 2020-08-11 11:18:40 -0400 |
commit | c4e6d5f47a876ac7e6446531005665d6547fafb5 (patch) | |
tree | 2e4ba14484a37da3e1f9ed1b10d1aab193356cde /main.F90 | |
parent | e9dfc0a04d1bdb018ae77f1d914bf0e77f3370b6 (diff) | |
download | LR-87-c4e6d5f47a876ac7e6446531005665d6547fafb5.tar.gz LR-87-c4e6d5f47a876ac7e6446531005665d6547fafb5.zip |
Favorites can be removed too. Added some robustness to loading favorites, especially when there are none remaining.
Diffstat (limited to 'main.F90')
-rw-r--r-- | main.F90 | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -256,7 +256,13 @@ implicit none loaded = .false. case (render_action_favorite) - call add_favorite(faves, current_url, current_url) + if(is_favorite(faves, current_url)) then + call remove_favorite(faves, current_url) + call r%report_status(trim(current_url)//" removed as favorite") + else + call add_favorite(faves, current_url, current_url) + call r%report_status("Added favorite: "//trim(current_url)) + end if call save_favorites(faves) end select @@ -345,7 +351,7 @@ contains use favorite_handling, only: write_favorites, favorite implicit none - type(favorite), dimension(:)::faves + type(favorite), dimension(:), intent(in), pointer::faves character(260)::filename integer::ios, loadunit |