add gs
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
local Modules = game:GetService("CoreGui").RobloxGui.Modules
|
||||
local Immutable = require(Modules.Common.Immutable)
|
||||
local FetchPrivilegeSettings = require(Modules.Shell.Actions.FetchPrivilegeSettings)
|
||||
local SetPrivilegeSettings = require(Modules.Shell.Actions.SetPrivilegeSettings)
|
||||
|
||||
return function(state, action)
|
||||
state = state or {}
|
||||
if action.type == FetchPrivilegeSettings.name then
|
||||
state = Immutable.Set(state, "isRequesting", true)
|
||||
elseif action.type == SetPrivilegeSettings.name then
|
||||
if action.Multiplayer and action.SharedContent then
|
||||
local multiplayerSetting = state.Multiplayer or {}
|
||||
local sharedContentSetting = state.SharedContent or {}
|
||||
state = {
|
||||
Multiplayer = Immutable.JoinDictionaries(multiplayerSetting, action.Multiplayer),
|
||||
SharedContent = Immutable.JoinDictionaries(sharedContentSetting, action.SharedContent),
|
||||
lastUpdated = action.timestamp,
|
||||
isRequesting = false
|
||||
}
|
||||
else
|
||||
state = {}
|
||||
end
|
||||
end
|
||||
|
||||
return state
|
||||
end
|
||||
Reference in New Issue
Block a user