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

🐛 Send Message Close Alert 추가 #35

Merged
merged 6 commits into from
Jan 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 19 additions & 8 deletions Dear-World/Dear-World.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
121BDB44259735200062B15A /* UIColor+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 121BDB43259735200062B15A /* UIColor+.swift */; };
121BDB592597652A0062B15A /* MessageTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 121BDB582597652A0062B15A /* MessageTableViewCell.swift */; };
121BDB672597982F0062B15A /* DiscoverReactor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 121BDB662597982F0062B15A /* DiscoverReactor.swift */; };
121BDB6C2597A49B0062B15A /* MessageMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 121BDB6B2597A49B0062B15A /* MessageMock.swift */; };
121BDB712597A5D60062B15A /* APIMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 121BDB702597A5D60062B15A /* APIMock.swift */; };
121BDB8E259829840062B15A /* CountrySelectController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 121BDB8D259829840062B15A /* CountrySelectController.swift */; };
12257E1825A622750007E65E /* SortTypeSelectController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12257E1725A622750007E65E /* SortTypeSelectController.swift */; };
1263E09725A1C87400E3F121 /* Message.API.Countries.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1263E09625A1C87400E3F121 /* Message.API.Countries.swift */; };
Expand All @@ -28,6 +26,7 @@
3902F12425970E5600A3DF8C /* Number+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3902F12325970E5600A3DF8C /* Number+.swift */; };
3902F12A259714D800A3DF8C /* RankerTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3902F129259714D800A3DF8C /* RankerTableViewCell.swift */; };
3914D9E6259F3FA1009765B0 /* Message.Model.Messages.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3914D9E5259F3FA1009765B0 /* Message.Model.Messages.swift */; };
391E066A25AB7BBF006158E4 /* Kingfisher in Frameworks */ = {isa = PBXBuildFile; productRef = 391E066925AB7BBF006158E4 /* Kingfisher */; };
393E0D4025A23A12000DB3B9 /* World.Model.Map.swift in Sources */ = {isa = PBXBuildFile; fileRef = 393E0D3F25A23A12000DB3B9 /* World.Model.Map.swift */; };
393E0D4525A23A7B000DB3B9 /* World.API.Map.swift in Sources */ = {isa = PBXBuildFile; fileRef = 393E0D4425A23A7B000DB3B9 /* World.API.Map.swift */; };
393E0D5725A2BE3C000DB3B9 /* AboutTeamViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 393E0D5625A2BE3C000DB3B9 /* AboutTeamViewController.swift */; };
Expand Down Expand Up @@ -115,8 +114,6 @@
121BDB43259735200062B15A /* UIColor+.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = "UIColor+.swift"; sourceTree = "<group>"; tabWidth = 2; };
121BDB582597652A0062B15A /* MessageTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageTableViewCell.swift; sourceTree = "<group>"; };
121BDB662597982F0062B15A /* DiscoverReactor.swift */ = {isa = PBXFileReference; indentWidth = 2; lastKnownFileType = sourcecode.swift; path = DiscoverReactor.swift; sourceTree = "<group>"; tabWidth = 2; };
121BDB6B2597A49B0062B15A /* MessageMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageMock.swift; sourceTree = "<group>"; };
121BDB702597A5D60062B15A /* APIMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = APIMock.swift; sourceTree = "<group>"; };
121BDB8D259829840062B15A /* CountrySelectController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CountrySelectController.swift; sourceTree = "<group>"; };
12257E1725A622750007E65E /* SortTypeSelectController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SortTypeSelectController.swift; sourceTree = "<group>"; };
1263E09625A1C87400E3F121 /* Message.API.Countries.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Message.API.Countries.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -207,6 +204,7 @@
3971EB32259A8BC90084E6DC /* SwiftRichString in Frameworks */,
39518C8125A8FB9D00F777D1 /* FirebaseCrashlytics in Frameworks */,
395825F0259494B1007325AB /* ReactorKit in Frameworks */,
391E066A25AB7BBF006158E4 /* Kingfisher in Frameworks */,
3958261B2596D06C007325AB /* Then in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -454,8 +452,6 @@
121BDB57259764F10062B15A /* Cell */,
395826112596322B007325AB /* DiscoverViewController.swift */,
121BDB662597982F0062B15A /* DiscoverReactor.swift */,
121BDB6B2597A49B0062B15A /* MessageMock.swift */,
121BDB702597A5D60062B15A /* APIMock.swift */,
);
path = Discover;
sourceTree = "<group>";
Expand Down Expand Up @@ -634,6 +630,7 @@
39518C8025A8FB9D00F777D1 /* FirebaseCrashlytics */,
39518C8225A8FB9D00F777D1 /* FirebaseRemoteConfig */,
39518C8425A8FB9D00F777D1 /* FirebaseAuth */,
391E066925AB7BBF006158E4 /* Kingfisher */,
);
productName = "Dear-World";
productReference = 3958257725948E41007325AB /* Dear-World.app */;
Expand Down Expand Up @@ -719,6 +716,7 @@
3971EB30259A8BC90084E6DC /* XCRemoteSwiftPackageReference "SwiftRichString" */,
39658F99259ADB130050D180 /* XCRemoteSwiftPackageReference "lottie-ios" */,
39518C7B25A8FB9D00F777D1 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */,
391E066825AB7BBF006158E4 /* XCRemoteSwiftPackageReference "Kingfisher" */,
);
productRefGroup = 3958257825948E41007325AB /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -823,7 +821,6 @@
buildActionMask = 2147483647;
files = (
39EED241259D0227007452E1 /* Revision.swift in Sources */,
121BDB712597A5D60062B15A /* APIMock.swift in Sources */,
39672DB32598D139001D7E69 /* SelectCountryView.swift in Sources */,
39E9F7DB25A1BBED00BC2CC2 /* PixelWorldMapView.swift in Sources */,
3902F118259704AF00A3DF8C /* AboutViewController.swift in Sources */,
Expand Down Expand Up @@ -877,7 +874,6 @@
39E9F7E025A1BC3C00BC2CC2 /* NoticeBadge.swift in Sources */,
12257E1825A622750007E65E /* SortTypeSelectController.swift in Sources */,
39E9F7ED25A1C84900BC2CC2 /* WorldMap.Model.Country.swift in Sources */,
121BDB6C2597A49B0062B15A /* MessageMock.swift in Sources */,
39658FC0259AE58C0050D180 /* World.Model.Country.swift in Sources */,
121BDB8E259829840062B15A /* CountrySelectController.swift in Sources */,
121BDB672597982F0062B15A /* DiscoverReactor.swift in Sources */,
Expand Down Expand Up @@ -1057,6 +1053,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.0;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = "com.OFU.Dear-World";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -1079,6 +1076,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 1.0.0;
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = "com.OFU.Dear-World";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down Expand Up @@ -1213,6 +1211,14 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
391E066825AB7BBF006158E4 /* XCRemoteSwiftPackageReference "Kingfisher" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/onevcat/Kingfisher";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 6.0.1;
};
};
39518C7B25A8FB9D00F777D1 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/firebase/firebase-ios-sdk.git";
Expand Down Expand Up @@ -1312,6 +1318,11 @@
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
391E066925AB7BBF006158E4 /* Kingfisher */ = {
isa = XCSwiftPackageProductDependency;
package = 391E066825AB7BBF006158E4 /* XCRemoteSwiftPackageReference "Kingfisher" */;
productName = Kingfisher;
};
39518C7C25A8FB9D00F777D1 /* FirebaseInstallations */ = {
isa = XCSwiftPackageProductDependency;
package = 39518C7B25A8FB9D00F777D1 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@
"version": "1.5.0"
}
},
{
"package": "Kingfisher",
"repositoryURL": "https://github.com/onevcat/Kingfisher",
"state": {
"branch": null,
"revision": "0be276f6a7fd54af4c3eb03f2d12e12d8c8a1a1d",
"version": "6.0.1"
}
},
{
"package": "leveldb",
"repositoryURL": "https://github.com/firebase/leveldb.git",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ import Foundation

extension Emoji.Model {
struct Random: Decodable {
let id: Int
let id: Int?
let unicode: String
let imageURL: String

enum CodingKeys: String, CodingKey {
case id
case unicode
case imageURL = "imageUrl"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import Foundation

extension Message.Model {
struct SendMessage: Decodable {
let likeCount: Int
let id: Int
let anonymousUserId: Int
let content: String
let likeCount: Int
let anonymousUserId: Int
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ extension World.Model {
let code: String
let name: String
let emoji: String
let imageURL: String?
let status: Status?

enum CodingKeys: String, CodingKey {
Expand All @@ -21,6 +22,7 @@ extension World.Model {
case name = "fullName"
case emoji = "emojiUnicode"
case status = "countryStatus"
case imageURL = "imageUrl"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ final class AboutReactor: Reactor {
switch action {
case .initalize:
return .empty()

case .tapCrewInfo:
return .just(.setPresentCrewInfo(true))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ final class RankerTableViewCell: UITableViewCell {

// MARK: 🖼 UI
let rankLabel: UILabel = UILabel()
let countryFlagLabel: UILabel = UILabel()
let countryFlagImageView: UIImageView = UIImageView()
let countryNameLabel: UILabel = UILabel()
let messageCountLabel: UILabel = UILabel()
let cheerUpButton: CheerUpButton = CheerUpButton()
Expand All @@ -51,21 +51,19 @@ final class RankerTableViewCell: UITableViewCell {
// MARK: 📍 Setup
private func setupUI() {
self.contentView.addSubview(rankLabel)
self.contentView.addSubview(countryFlagLabel)
self.contentView.addSubview(countryFlagImageView)
rankLabel.do {
$0.font = .boldSystemFont(ofSize: 12)
}
rankLabel.snp.makeConstraints {
$0.leading.equalToSuperview().inset(20)
$0.bottom.equalTo(countryFlagLabel)
$0.bottom.equalTo(countryFlagImageView)
}

countryFlagLabel.do {
$0.font = .boldSystemFont(ofSize: 14)
}
countryFlagLabel.snp.makeConstraints {
countryFlagImageView.snp.makeConstraints {
$0.top.equalToSuperview().inset(14)
$0.leading.equalToSuperview().inset(62)
$0.width.equalTo(18)
$0.height.equalTo(18)
}

self.contentView.addSubview(countryNameLabel)
Expand All @@ -75,15 +73,15 @@ final class RankerTableViewCell: UITableViewCell {
}
countryNameLabel.snp.makeConstraints {
$0.top.equalToSuperview().inset(12)
$0.leading.equalTo(countryFlagLabel.snp.trailing).offset(10)
$0.leading.equalTo(countryFlagImageView.snp.trailing).offset(10)
}

let messageImageView: UIImageView = UIImageView(image: UIImage(named: "message_default")!)
self.contentView.addSubview(messageImageView)
messageImageView.snp.makeConstraints {
$0.leading.equalTo(countryNameLabel)
$0.width.equalTo(12)
$0.height.equalTo(9)
$0.width.equalTo(18)
$0.height.equalTo(12)
$0.top.equalTo(countryNameLabel.snp.bottom).offset(10)
}

Expand Down Expand Up @@ -114,7 +112,9 @@ final class RankerTableViewCell: UITableViewCell {
func configure(with country: World.Model.Country, ranking: Int) {
rankLabel.attributedText = formatRank(ranking)
countryNameLabel.text = country.name
countryFlagLabel.text = country.emoji
if let url = URL(string: country.imageURL) {
countryFlagImageView.kf.setImage(with: url)
}
messageCountLabel.text = country.status?.messageCount.formatted
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ import UIKit
final class MessageTableViewCell: UITableViewCell {
let disposeBag: DisposeBag = DisposeBag()
// MARK: 🖼 UI
let emojiLabel: UILabel = UILabel()
let emojiImageView: UIImageView = UIImageView()
let nameLabel: UILabel = UILabel()
let countryLabel: UILabel = UILabel()
let countryFlagImageView: UIImageView = UIImageView()
let detailTextView: UITextView = UITextView()
let likeView: UIImageView = UIImageView()
let likeCountLabel: UILabel = UILabel()
Expand Down Expand Up @@ -78,13 +79,8 @@ final class MessageTableViewCell: UITableViewCell {
$0.height.width.equalTo(40)
}

self.emojiLabel.do {
$0.text = "🎅🏻"
$0.font = .systemFont(ofSize: 14)
$0.textAlignment = .center
}
mainView.addSubview(self.emojiLabel)
self.emojiLabel.snp.makeConstraints {
mainView.addSubview(emojiImageView)
emojiImageView.snp.makeConstraints {
$0.size.equalTo(20)
$0.center.equalTo(emojiView)
}
Expand All @@ -101,15 +97,21 @@ final class MessageTableViewCell: UITableViewCell {
$0.trailing.greaterThanOrEqualToSuperview().inset(30)
}

mainView.addSubview(countryFlagImageView)
countryFlagImageView.snp.makeConstraints {
$0.bottom.equalTo(emojiView.snp.bottom)
$0.leading.equalTo(emojiView.snp.trailing).offset(10)
$0.width.height.equalTo(18)
}
self.countryLabel.do {
$0.text = "🇰🇷 South Korea"
$0.text = "South Korea"
$0.font = .boldSystemFont(ofSize: 12)
$0.textColor = .grayWhite
}
mainView.addSubview(self.countryLabel)
self.countryLabel.snp.makeConstraints {
$0.bottom.equalTo(emojiView.snp.bottom)
$0.leading.equalTo(emojiView.snp.trailing).offset(10)
$0.centerY.equalTo(countryFlagImageView)
$0.leading.equalTo(countryFlagImageView.snp.trailing).offset(10)
$0.trailing.greaterThanOrEqualToSuperview().inset(30)
}

Expand Down
Loading