diff options
author | Fire Demon <firedemon@creature.cafe> | 2020-08-17 22:24:53 -0500 |
---|---|---|
committer | Fire Demon <firedemon@creature.cafe> | 2020-08-30 05:45:19 -0500 |
commit | 7c60194c81a9a329d9f5af141fb050816563171d (patch) | |
tree | 6afa464c7317e2594253dff0ebadaea198bc8042 /app/lib | |
parent | 471f698f85c1737c85c4448ab4d9e9ddcb59bd7f (diff) |
[Command Tags] Remove footer from post when deleting default or current signature
Diffstat (limited to 'app/lib')
-rw-r--r-- | app/lib/command_tag/command/footer_tools.rb | 7 |
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) |