From 7c60194c81a9a329d9f5af141fb050816563171d Mon Sep 17 00:00:00 2001 From: Fire Demon Date: Mon, 17 Aug 2020 22:24:53 -0500 Subject: [Command Tags] Remove footer from post when deleting default or current signature --- app/lib/command_tag/command/footer_tools.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/lib/command_tag/command/footer_tools.rb b/app/lib/command_tag/command/footer_tools.rb index 505dd6931..f2ee39ffa 100644 --- a/app/lib/command_tag/command/footer_tools.rb +++ b/app/lib/command_tag/command/footer_tools.rb @@ -12,7 +12,12 @@ module CommandTag::Command::FooterTools var_name = "persist:footer:#{name}" return @status.footer = var(var_name)[0] if args.blank? - return @vars.delete(var_name) if read_falsy_from(normalize(args[0])) + + if read_falsy_from(normalize(args[0])) + @status.footer = nil if ['default', var(var_name)[0]].include?(name) + @vars.delete(var_name) + return + end if name == 'default' name = normalize(args.shift) -- cgit