Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IDLE-489] 채팅목록 리스트 UI구현 #99

Merged
merged 9 commits into from
Nov 5, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public enum DeploymentSettings {

/// SceneDelegate를 지원하는 iOS 15이상 버전을 요구합니다.
public static let productName = "Caremeet"
public static let deployment_app_version = "1.1.0"
public static let deployment_app_version = "1.1.1"
public static let deployment_iOS_version = DeploymentTargets.iOS("15.0")
public static let platforms: Set = [Destination.iPad, Destination.iPhone]
public static let workspace_name = "idle_workspace"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// ChattingFeatureDependency.swift
// DependencyPlugin
//
// Created by 최준영 on 6/21/24.
//

import ProjectDescription

public extension ModuleDependency.Presentation {

static let ChattingFeature: TargetDependency = .project(target: "ChattingFeature", path: .relativeToRoot("Projects/Presentation/Feature/Chatting"))

static let ChattingFeatureInterface: TargetDependency = .project(target: "ChattingFeatureInterface", path: .relativeToRoot("Projects/Presentation/Feature/Chatting"))
}
11 changes: 11 additions & 0 deletions project/Projects/App/Sources/DIAssembly/PresentationAssembly.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
//

import Foundation

import ChattingFeatureInterface
import ChattingFeature
import BaseFeature
import RootFeature

Expand All @@ -15,19 +18,27 @@ import Swinject
public struct PresentationAssembly: Assembly {
public func assemble(container: Container) {

// MARK: Remote config
container.register(RemoteConfigService.self) { _ in
DefaultRemoteConfigService()
}
.inObjectScope(.container)

// MARK: Router
container.register(RouterProtocol.self) { _ in
Router()
}
.inObjectScope(.container)

// MARK: Remote notification
container.register(RemoteNotificationHelper.self) { _ in
DefaultRemoteNotificationHelper()
}
.inObjectScope(.container)

// MARK: Chatting feature
container.register(ChattingListFeatureFactory.self) { _ in
DefaultChattingListFeatureFactory()
}
}
}
2 changes: 1 addition & 1 deletion project/Projects/App/Tests/Empty.swift
Original file line number Diff line number Diff line change
@@ -1 +1 @@
import Foundation
import Testing
4 changes: 3 additions & 1 deletion project/Projects/Data/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ let project = Project(
sources: ["DataTests/**"],
dependencies: [
D.Testing,
D.Data.Repository,
D.Data.DataSource,
],
settings: .settings(
configurations: IdleConfiguration.dataConfigurations
Expand All @@ -83,7 +85,7 @@ let project = Project(
schemes: [
Scheme.makeTestableSchemes(
.target("Repository"),
testableTarget: .target("DataTests"),
testableTarget: .target("Data"),
configNames: [
IdleConfiguration.debugConfigName,
IdleConfiguration.releaseConfigName,
Expand Down
4 changes: 3 additions & 1 deletion project/Projects/Domain/Project.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ let project = Project(

// for test
D.Testing,

D.Domain,
],
settings: .settings(
configurations: IdleConfiguration.domainConfigurations
Expand All @@ -56,7 +58,7 @@ let project = Project(
schemes: [
Scheme.makeTestableSchemes(
.target("Domain"),
testableTarget: .target("DomainTests"),
testableTarget: .target("Domain"),
configNames: [
IdleConfiguration.debugConfigName,
IdleConfiguration.releaseConfigName,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//
// ChattingListItemVO.swift
// Domain
//
// Created by choijunios on 11/5/24.
//

import Foundation

public struct ChattingListItemVO {

public let id: String
public let counterPartName: String
public let latestChat: String
public let latestChatTime: Date

public init(
id: String,
counterPartName: String,
latestChat: String,
latestChatTime: Date
) {
self.id = id
self.counterPartName = counterPartName
self.latestChat = latestChat
self.latestChatTime = latestChatTime
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,15 @@ public class NavigationBarType1: UIStackView {
private let disposeBag = DisposeBag()

public init(
navigationTitle: String = ""
navigationTitle: String = "",
hideBackButton: Bool = false
) {
super.init(frame: .zero)

self.navigationTitle = navigationTitle

backButton.isHidden = hideBackButton

setApearance()
setAutoLayout()
setObservable()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ let project = Project(
dependencies: [
// Presentation
D.Presentation.BaseFeature,
D.Presentation.ChattingFeatureInterface,
],
settings: .settings(
configurations: IdleConfiguration.presentationConfigurations
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina6_12" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/>
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
<capability name="System colors in document resources" minToolsVersion="11.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Feature 예시앱 입니다." textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EYZ-iW-z8a">
<rect key="frame" x="116.66666666666669" y="415.66666666666669" width="160" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="EYZ-iW-z8a" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="49c-m0-m2d"/>
<constraint firstItem="EYZ-iW-z8a" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="ego-Ut-heY"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor>
</resources>
</document>
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//
// AppDelegate.swift
//
//
// Created by 최준영 on 6/19/24.
//

import UIKit

@main
class AppDelegate: UIResponder, UIApplicationDelegate {



func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}

// MARK: UISceneSession Lifecycle

func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}

func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}


}

Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//
// SceneDelegate.swift
//
//
// Created by 최준영 on 6/19/24.
//

import UIKit

import ChattingFeature
import Core

class SceneDelegate: UIResponder, UIWindowSceneDelegate {

var window: UIWindow?

func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {

guard let windowScene = scene as? UIWindowScene else { return }

let vc = DefaultChattingListFeatureFactory().createModule()

window = UIWindow(windowScene: windowScene)
window?.rootViewController = vc
window?.makeKeyAndVisible()
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//
// ViewController.swift
//
//
// Created by 최준영 on 6/19/24.
//

import UIKit

class ViewController: UIViewController {

override func viewDidLoad() {

let initialLabel = UILabel()

initialLabel.text = "Example app"

view.backgroundColor = .white

view.addSubview(initialLabel)
initialLabel.translatesAutoresizingMaskIntoConstraints = false

NSLayoutConstraint.activate([
initialLabel.centerXAnchor.constraint(equalTo: view.centerXAnchor),
initialLabel.centerYAnchor.constraint(equalTo: view.centerYAnchor),
])
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// ChattingListFeatureFactory.swift
// Chatting
//
// Created by choijunios on 11/5/24.
//

import UIKit

public protocol ChattingListFeatureFactory {

typealias Module = UIViewController

func createModule() -> Module
}
Loading