Skip to content
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
6 changes: 3 additions & 3 deletions Views/LocationRegistration.swift
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ struct LocationRegistration: View {
// }
// 2.db의 users의 uid같은거에서 유저네임 수정.
Firestore.firestore().collection("users").document("\(userid)").setData([
"roadAddr" : searchJusoViewModel.jusodata.roadAddr,
"sggNm" : searchJusoViewModel.jusodata.sggNm,
"emdNm" : searchJusoViewModel.jusodata.emdNm,
"roadAddr" : searchJusoViewModel.jusodata.roadAddr ?? "",
"sggNm" : searchJusoViewModel.jusodata.sggNm ?? "",
"emdNm" : searchJusoViewModel.jusodata.emdNm ?? "",
"latitude" : searchJusoViewModel.searchLatitude,
"longitude" : searchJusoViewModel.searchLongitude]
, merge: true) { err in
Expand Down
4 changes: 2 additions & 2 deletions Views/NeighborGridView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class NeighborViewModel: ObservableObject {
func getUserLocation() {
db.collection("users").document(userid).getDocument { [self] user, err in
if let user = user {
self.userLatitude = user.get("latitude") as! String
self.userLongitude = user.get("longitude") as! String
self.userLatitude = user.get("latitude") as? String ?? ""
self.userLongitude = user.get("longitude") as? String ?? ""
} else {
if let err = err {
print("Error getting documents: \(err)")
Expand Down
30 changes: 27 additions & 3 deletions Views/TestBookmarkView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ struct TestBookmarkViewImageRow: View {


var body: some View {


VStack(alignment: .leading, spacing: 10){
ZStack(alignment: .topTrailing ){
if let image = libModel.image {
Expand All @@ -175,14 +177,36 @@ struct TestBookmarkViewImageRow: View {
.padding(EdgeInsets(top: 10, leading: 0, bottom: 0, trailing: 10))

}
HStack (alignment: .top, spacing: 10){
HStack (alignment: .top){
if libModel.bookname.count > 15 {
Text(libModel.bookname.prefix(15) + "…")
.font(.system(size: 15, weight: .bold))
.foregroundColor(.mainBlue)
+
Text(" ")
+
Text(libModel.title)
.font(.system(size: 15, weight: .light))
.foregroundColor(.black)
}
else {
Text(libModel.bookname)
.font(.system(size: 12, weight: .bold))
.font(.system(size: 15, weight: .bold))
.foregroundColor(.mainBlue)
+
Text(" ")
+
Text(libModel.title)
.font(.system(size: 12, weight: .light))
.font(.system(size: 15, weight: .light))
.foregroundColor(.black)
}
}

.multilineTextAlignment(.leading)
.lineLimit(2)
.frame(height: 45)
.truncationMode(.tail)

.padding(.bottom, 10)
}
}
Expand Down