about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFire Demon <firedemon@creature.cafe>2020-08-17 22:24:53 -0500
committerFire Demon <firedemon@creature.cafe>2020-08-30 05:45:19 -0500
commit7c60194c81a9a329d9f5af141fb050816563171d (patch)
tree6afa464c7317e2594253dff0ebadaea198bc8042
parent471f698f85c1737c85c4448ab4d9e9ddcb59bd7f (diff)
[Command Tags] Remove footer from post when deleting default or current signature
-rw-r--r--app/lib/command_tag/command/footer_tools.rb7
1 files changed, 6 insertions, 1 deletions
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)