Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
enzevalos_iphone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
enzevalos
enzevalos_iphone
Commits
73aa3b02
Commit
73aa3b02
authored
4 years ago
by
Oliver Wiese
Browse files
Options
Downloads
Patches
Plain Diff
new mailrowView
parent
68b51280
No related branches found
No related tags found
1 merge request
!84
Resolve "Missing backend features/connections for UI"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
enzevalos_iphone/ContactHandler.swift
+1
-1
1 addition, 1 deletion
enzevalos_iphone/ContactHandler.swift
enzevalos_iphone/SwiftUI/Inbox/MailRowView.swift
+49
-0
49 additions, 0 deletions
enzevalos_iphone/SwiftUI/Inbox/MailRowView.swift
with
50 additions
and
1 deletion
enzevalos_iphone/ContactHandler.swift
+
1
−
1
View file @
73aa3b02
...
...
@@ -24,7 +24,7 @@ import SwiftUI
// TODO: Mark displayname as from CNContact
class
ContactHandler
{
static
var
cartoons
=
tru
e
static
var
cartoons
=
fals
e
private
let
store
=
CNContactStore
()
static
let
handler
=
ContactHandler
()
...
...
This diff is collapsed.
Click to expand it.
enzevalos_iphone/SwiftUI/Inbox/MailRowView.swift
+
49
−
0
View file @
73aa3b02
...
...
@@ -28,6 +28,55 @@ struct MailRowView <M: DisplayMail>: View {
var
activateOnTap
:
Bool
=
true
var
body
:
some
View
{
body_v2
}
private
var
content
:
String
{
get
{
let
max
=
500
if
mail
.
subject
.
count
<
max
{
return
mail
.
subject
+
"
\n
"
+
mail
.
body
.
prefix
(
max
-
mail
.
subject
.
count
)
}
return
mail
.
subject
}
}
private
var
body_v2
:
some
View
{
VStack
(
alignment
:
.
leading
)
{
HStack
{
// Sender name
Text
(
mail
.
sender
.
name
)
.
fontWeight
(
mail
.
isRead
?
.
regular
:
.
medium
)
.
lineLimit
(
2
)
Spacer
()
if
!
mail
.
displayAttachments
.
isEmpty
{
Image
(
systemName
:
"paperclip"
)
.
font
(
.
caption
)
.
foregroundColor
(
.
secondary
)
}
// Arrival time
Text
(
mail
.
date
.
timeAgoText
())
.
font
(
.
caption
)
.
padding
(
.
trailing
,
-
20
)
}
HStack
{
avatar
// Subject
Text
(
content
)
.
font
(
.
caption
)
.
lineLimit
(
6
)
}
.
padding
(
.
top
,
-
7
)
.
frame
(
height
:
65
)
}
.
foregroundColor
(
mail
.
isRead
?
.
secondary
:
.
primary
)
}
private
var
body_v1
:
some
View
{
HStack
{
avatar
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment