2019-01-18 10:12:08 +00:00
|
|
|
/*
|
2019-01-25 13:04:59 +00:00
|
|
|
* Copyright 2019 New Vector Ltd
|
2019-01-18 10:12:08 +00:00
|
|
|
*
|
2019-01-25 13:04:59 +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
|
|
|
*
|
2019-01-25 13:04:59 +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
|
|
|
*/
|
|
|
|
|
2018-10-28 18:18:14 +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
|
2019-02-20 10:39:25 +00:00
|
|
|
import im.vector.riotredesign.features.home.room.detail.timeline.*
|
2019-01-24 17:04:55 +00:00
|
|
|
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
|
2019-01-29 13:16:22 +00:00
|
|
|
import im.vector.riotredesign.features.home.room.list.RoomSummaryController
|
2018-10-28 18:18:14 +00:00
|
|
|
import org.koin.dsl.module.module
|
|
|
|
|
2019-01-15 14:47:03 +00:00
|
|
|
class HomeModule {
|
2018-10-28 18:18:14 +00:00
|
|
|
|
2018-12-20 14:44:01 +00:00
|
|
|
val definition = module(override = true) {
|
2018-10-28 18:18:14 +00:00
|
|
|
|
2018-11-02 16:37:37 +00:00
|
|
|
single {
|
2018-11-02 10:50:56 +00:00
|
|
|
TimelineDateFormatter(get())
|
|
|
|
}
|
|
|
|
|
2018-11-02 16:37:37 +00:00
|
|
|
single {
|
2019-02-21 18:21:08 +00:00
|
|
|
MessageItemFactory(get(), get(), get(), get())
|
2018-11-02 16:37:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
single {
|
2019-01-15 14:47:03 +00:00
|
|
|
RoomNameItemFactory(get())
|
|
|
|
}
|
|
|
|
|
|
|
|
single {
|
|
|
|
RoomTopicItemFactory(get())
|
|
|
|
}
|
|
|
|
|
|
|
|
single {
|
|
|
|
RoomMemberItemFactory(get())
|
|
|
|
}
|
|
|
|
|
2019-02-20 14:47:20 +00:00
|
|
|
single {
|
|
|
|
CallItemFactory(get())
|
|
|
|
}
|
|
|
|
|
2019-02-20 11:06:33 +00:00
|
|
|
single {
|
|
|
|
RoomHistoryVisibilityItemFactory(get())
|
|
|
|
}
|
|
|
|
|
2019-01-15 14:47:03 +00:00
|
|
|
single {
|
|
|
|
DefaultItemFactory()
|
|
|
|
}
|
|
|
|
|
|
|
|
single {
|
2019-02-20 14:47:20 +00:00
|
|
|
TimelineItemFactory(get(), get(), get(), get(), get(), get(), get())
|
2018-11-02 16:37:37 +00:00
|
|
|
}
|
|
|
|
|
2018-12-30 12:02:20 +00:00
|
|
|
single {
|
|
|
|
HomeNavigator()
|
2018-12-20 14:44:01 +00:00
|
|
|
}
|
|
|
|
|
2019-01-29 13:16:22 +00:00
|
|
|
factory {
|
|
|
|
RoomSummaryController(get())
|
|
|
|
}
|
|
|
|
|
2018-11-27 11:23:15 +00:00
|
|
|
factory { (roomId: String) ->
|
2019-01-24 17:04:55 +00:00
|
|
|
TimelineEventController(roomId, get(), get(), get())
|
|
|
|
}
|
|
|
|
|
|
|
|
single {
|
|
|
|
TimelineMediaSizeProvider()
|
2018-11-02 10:50:56 +00:00
|
|
|
}
|
|
|
|
|
2018-12-29 18:57:38 +00:00
|
|
|
single {
|
2019-02-19 10:16:31 +00:00
|
|
|
SelectedGroupStore()
|
2018-12-29 18:57:38 +00:00
|
|
|
}
|
|
|
|
|
2019-01-11 11:07:38 +00:00
|
|
|
single {
|
2019-02-19 10:16:31 +00:00
|
|
|
VisibleRoomStore()
|
2019-01-11 11:07:38 +00:00
|
|
|
}
|
|
|
|
|
2019-01-03 20:26:39 +00:00
|
|
|
single {
|
|
|
|
HomePermalinkHandler(get())
|
|
|
|
}
|
|
|
|
|
2019-01-29 15:02:42 +00:00
|
|
|
single {
|
|
|
|
RoomSummaryComparator()
|
|
|
|
}
|
|
|
|
|
2019-01-11 11:07:38 +00:00
|
|
|
|
2018-12-20 14:44:01 +00:00
|
|
|
}
|
2018-10-28 18:18:14 +00:00
|
|
|
}
|