Skip to content

Commit 2a0991e

Browse files
committed
🔧 Fix HistoryRepository: Remove expect/actual
Replaced 'expect class HistoryRepositoryFactory' with simple 'object'. The expect/actual pattern requires platform-specific actual declarations. Using InMemoryHistoryRepository as default implementation. Fixes: Expected class 'HistoryRepositoryFactory' has no actual declaration
1 parent 16b32c6 commit 2a0991e

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

‎common/src/commonMain/kotlin/com/qrshield/data/HistoryRepository.kt‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,17 @@ class InMemoryHistoryRepository : HistoryRepository {
161161
/**
162162
* Factory for creating HistoryRepository instances.
163163
*
164-
* Expect/actual pattern for platform-specific implementations.
164+
* Uses InMemoryHistoryRepository by default.
165+
* For production, inject platform-specific SQLDelight implementations.
165166
*/
166-
expect class HistoryRepositoryFactory {
167-
fun create(): HistoryRepository
167+
object HistoryRepositoryFactory {
168+
/**
169+
* Creates an in-memory repository instance.
170+
*
171+
* Note: For production use, platform-specific implementations
172+
* should be injected via dependency injection (Koin).
173+
*/
174+
fun create(): HistoryRepository = InMemoryHistoryRepository()
168175
}
169176

170177
/**

0 commit comments

Comments
 (0)