aboutsummaryrefslogtreecommitdiff
path: root/main.F90
diff options
context:
space:
mode:
authorJeffrey Armstrong <jeff@approximatrix.com>2020-08-11 11:18:40 -0400
committerJeffrey Armstrong <jeff@approximatrix.com>2020-08-11 11:18:40 -0400
commitc4e6d5f47a876ac7e6446531005665d6547fafb5 (patch)
tree2e4ba14484a37da3e1f9ed1b10d1aab193356cde /main.F90
parente9dfc0a04d1bdb018ae77f1d914bf0e77f3370b6 (diff)
downloadLR-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.F9010
1 files changed, 8 insertions, 2 deletions
diff --git a/main.F90 b/main.F90
index 9af9708..0926192 100644
--- a/main.F90
+++ b/main.F90
@@ -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