-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
imUrlDataApp - Fix app sender to send last-tapped emoji (was always "…
…happy") MessagesViewController.swift - Mood enum moved out to its own file - local let moodKey moved to Mood enum - subscript added MessageComposingHelper - displayMessageInterface take a mood param instead of using hardcoded strings ViewController - onAppSendButton pass mood to displayMessageInterface - buttonFor(mood) helper added - tap(mood) added - viewDidLoad - call tap(mood) to get highlighted - set button isEnabled state (now we're not using them to toggle back on, should only be tappable when enabled) - onHappy…Angry - call tap(mood:) instead of toggle, so tapping emoji sets the one to send - matchButtonsToToggles - set isEnabled state
- Loading branch information
1 parent
7db1b77
commit 9e30a15
Showing
6 changed files
with
99 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// | ||
// Mood.swift | ||
// imUrlDataApp | ||
// | ||
// Created by AndyDent on 6/8/2022. | ||
// Copyright © 2022 Touchgram Pty Ltd. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
enum Mood : String, CaseIterable { | ||
case happy | ||
case quizzical | ||
case distraught | ||
case angry | ||
|
||
static let moodKey = "mood" | ||
|
||
static subscript(i: Int) -> Mood? { | ||
guard i >= 0 && i < 4 else {return nil} | ||
return Mood.allCases[i] | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters