Don't use global deprecated initial state way

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2020-01-29 10:07:47 +01:00
Родитель 0637075f28
Коммит 376fc4c255
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 7076EA9751AACDDA
1 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -79,6 +79,7 @@
<script>
import Multiselect from '@nextcloud/vue/dist/Components/Multiselect'
import { loadState } from '@nextcloud/initial-state'
const startCallOptions = [
{ value: 0, label: t('spreed', 'Everyone') },
@ -117,10 +118,10 @@ export default {
mounted() {
this.loading = true
this.startCalls = startCallOptions[parseInt(OCP.InitialState.loadState('talk', 'start_calls'))]
this.conversationsFiles = parseInt(OCP.InitialState.loadState('talk', 'conversations_files')) === 1
this.defaultGroupNotification = defaultGroupNotificationOptions[parseInt(OCP.InitialState.loadState('talk', 'default_group_notification'))]
this.conversationsFilesPublicShares = parseInt(OCP.InitialState.loadState('talk', 'conversations_files_public_shares')) === 1
this.startCalls = startCallOptions[parseInt(loadState('talk', 'start_calls'))]
this.conversationsFiles = parseInt(loadState('talk', 'conversations_files')) === 1
this.defaultGroupNotification = defaultGroupNotificationOptions[parseInt(loadState('talk', 'default_group_notification'))]
this.conversationsFilesPublicShares = parseInt(loadState('talk', 'conversations_files_public_shares')) === 1
this.loading = false
},