Permalink
Browse files

Block enabling of share info if it has been forced disabled (default)

This allows hiding the share info even if the server later tries to enable it.
  • Loading branch information...
eelco committed Jul 29, 2016
1 parent f7736fe commit bc1237c06f43f3b010afb27e2715ac0784133dd6
Showing with 5 additions and 1 deletion.
  1. +5 −1 framer/Extras/ShareInfo.coffee
@@ -3,6 +3,8 @@
{Context} = require "../Context"
{ShareComponent} = require "../Components/ShareComponent"
ShareInfoDisabled = false
class ShareInfo extends BaseClass
constructor: (options={}) ->
@@ -24,9 +26,11 @@ class ShareInfo extends BaseClass
@context.destroy()
exports.enable = ->
return if ShareInfoDisabled
Framer.ShareInfo ?= new ShareInfo()
exports.disable = ->
exports.disable = (force = true) ->
ShareInfoDisabled = force
return unless Framer.ShareInfo
Framer.ShareInfo.destroy()
Framer.ShareInfo = null

0 comments on commit bc1237c

Please sign in to comment.