BayernMessenger/app/src/main/java/im/vector/riotredesign/features/home/HomeModule.kt

101 lines
2.4 KiB
Kotlin
Raw Normal View History

2019-01-18 10:12:08 +00:00
/*
* Copyright 2019 New Vector Ltd
2019-01-18 10:12:08 +00:00
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
2019-01-18 10:12:08 +00:00
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
2019-01-18 10:12:08 +00:00
*/
package im.vector.riotredesign.features.home
2019-02-19 10:16:31 +00:00
import im.vector.riotredesign.features.home.group.SelectedGroupStore
import im.vector.riotredesign.features.home.room.VisibleRoomStore
import im.vector.riotredesign.features.home.room.detail.timeline.*
import im.vector.riotredesign.features.home.room.detail.timeline.helper.TimelineMediaSizeProvider
2019-01-29 15:02:42 +00:00
import im.vector.riotredesign.features.home.room.list.RoomSummaryComparator
import im.vector.riotredesign.features.home.room.list.RoomSummaryController
import org.koin.dsl.module.module
class HomeModule {
val definition = module(override = true) {
single {
2018-11-02 10:50:56 +00:00
TimelineDateFormatter(get())
}
single {
MessageItemFactory(get(), get(), get(), get())
}
single {
RoomNameItemFactory(get())
}
single {
RoomTopicItemFactory(get())
}
single {
RoomMemberItemFactory(get())
}
2019-02-20 14:47:20 +00:00
single {
CallItemFactory(get())
}
single {
RoomHistoryVisibilityItemFactory(get())
}
single {
DefaultItemFactory()
}
single {
2019-02-20 14:47:20 +00:00
TimelineItemFactory(get(), get(), get(), get(), get(), get(), get())
}
2018-12-30 12:02:20 +00:00
single {
HomeNavigator()
}
factory {
RoomSummaryController(get())
}
2018-11-27 11:23:15 +00:00
factory { (roomId: String) ->
TimelineEventController(roomId, get(), get(), get())
}
single {
TimelineMediaSizeProvider()
2018-11-02 10:50:56 +00:00
}
single {
2019-02-19 10:16:31 +00:00
SelectedGroupStore()
}
single {
2019-02-19 10:16:31 +00:00
VisibleRoomStore()
}
single {
HomePermalinkHandler(get())
}
2019-01-29 15:02:42 +00:00
single {
RoomSummaryComparator()
}
}
}