Skip to content

Commit 41e7032

Browse files
Fix svelte-check
Signed-off-by: Artem Savchenko <[email protected]>
1 parent bb2391f commit 41e7032

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

plugins/telegram-resources/src/components/IntegrationState.svelte

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
let connection: Integration
2828
let channels: TelegramChannelConfig[] = []
2929
let isLoading = true
30-
let error: string | null = null
31-
let isRefreshing = false
3230
let status: Status | undefined
3331
3432
let integrationClient: IntegrationClient | undefined
@@ -46,15 +44,13 @@
4644
connection = connectionResult
4745
channels = (await listChannels(connection?.data?.phone)).map((channel) => ({
4846
...channel,
49-
access: 'private', // Default access since access property doesn't exist on TelegramChannel
5047
syncEnabled: channel.mode === 'sync'
5148
}))
5249
isLoading = false
5350
status = OK
5451
subscribe()
5552
} catch (err) {
5653
status = ERROR
57-
error = err instanceof Error ? err.message : 'Failed to load channels'
5854
isLoading = false
5955
console.error('Error loading channels:', err)
6056
}
@@ -82,7 +78,6 @@
8278
if (updatedChannel != null) {
8379
return {
8480
...channel,
85-
access: updatedChannel.access ?? channel.access,
8681
syncEnabled: updatedChannel.enabled
8782
}
8883
}
@@ -96,7 +91,6 @@
9691
9792
async function refresh (): Promise<void> {
9893
try {
99-
isRefreshing = true
10094
if (integrationClient === undefined) {
10195
integrationClient = await getIntegrationClient()
10296
}
@@ -105,13 +99,10 @@
10599
}
106100
channels = (await listChannels(connection.data.phone)).map((channel) => ({
107101
...channel,
108-
access: 'private', // Default access since access property doesn't exist on TelegramChannel
109102
syncEnabled: channel.mode === 'sync'
110103
}))
111104
} catch (err: any) {
112105
console.error('Error refresh channels:', err.message)
113-
} finally {
114-
isRefreshing = false
115106
}
116107
}
117108

0 commit comments

Comments
 (0)