enhance: pizzaxでstreamingのuser storage updateイベントを監視して更新 (#8095)
* wip * wip? * ? * streamingのuser storage updateイベントを監視して更新 * 必要な時以外はストレージを更新しない * fix? * wip * fix * fix
This commit is contained in:
		| @@ -15,9 +15,10 @@ | ||||
|  | ||||
| <script lang="ts"> | ||||
| import { defineAsyncComponent, defineComponent } from 'vue'; | ||||
| import { stream, popup, popups, uploads, pendingApiRequestsCount } from '@/os'; | ||||
| import { popup, popups, uploads, pendingApiRequestsCount } from '@/os'; | ||||
| import * as sound from '@/scripts/sound'; | ||||
| import { $i } from '@/account'; | ||||
| import { stream } from '@/stream'; | ||||
|  | ||||
| export default defineComponent({ | ||||
| 	components: { | ||||
|   | ||||
| @@ -11,6 +11,7 @@ | ||||
| <script lang="ts"> | ||||
| import { defineComponent } from 'vue'; | ||||
| import * as os from '@/os'; | ||||
| import { stream } from '@/stream'; | ||||
|  | ||||
| export default defineComponent({ | ||||
| 	data() { | ||||
| @@ -20,14 +21,14 @@ export default defineComponent({ | ||||
| 	}, | ||||
| 	computed: { | ||||
| 		stream() { | ||||
| 			return os.stream; | ||||
| 			return stream; | ||||
| 		}, | ||||
| 	}, | ||||
| 	created() { | ||||
| 		os.stream.on('_disconnected_', this.onDisconnected); | ||||
| 		stream.on('_disconnected_', this.onDisconnected); | ||||
| 	}, | ||||
| 	beforeUnmount() { | ||||
| 		os.stream.off('_disconnected_', this.onDisconnected); | ||||
| 		stream.off('_disconnected_', this.onDisconnected); | ||||
| 	}, | ||||
| 	methods: { | ||||
| 		onDisconnected() { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 tamaina
					tamaina