pairing works!!
Finally. Last bug fixes here: Send PairResp with same UUID in the PairReq. Fix off-by-one in code that filters out our own pairing messages. Also reworked the pairing alerts, which are still slightly buggy.
This commit is contained in:
parent
aace44454a
commit
2c1ceeeaf9
6 changed files with 51 additions and 40 deletions
|
@ -32,7 +32,7 @@ data AlertName
|
|||
= FileAlert TenseChunk
|
||||
| SanityCheckFixAlert
|
||||
| WarningAlert String
|
||||
| PairRequestReceivedAlert String
|
||||
| PairAlert String
|
||||
deriving (Eq)
|
||||
|
||||
{- The first alert is the new alert, the second is an old alert.
|
||||
|
@ -293,18 +293,27 @@ pairingAlert button = baseActivityAlert
|
|||
, alertButton = Just button
|
||||
}
|
||||
|
||||
pairRequestReceivedAlert :: String -> String -> AlertButton -> Alert
|
||||
pairRequestReceivedAlert repo msg button = Alert
|
||||
pairRequestReceivedAlert :: String -> AlertButton -> Alert
|
||||
pairRequestReceivedAlert repo button = Alert
|
||||
{ alertClass = Message
|
||||
, alertHeader = Nothing
|
||||
, alertMessageRender = tenseWords
|
||||
, alertData = [UnTensed $ T.pack msg]
|
||||
, alertData = [UnTensed $ T.pack $ repo ++ " is sending a pair request."]
|
||||
, alertBlockDisplay = False
|
||||
, alertPriority = High
|
||||
, alertClosable = True
|
||||
, alertIcon = Just InfoIcon
|
||||
, alertName = Just $ PairRequestReceivedAlert repo
|
||||
, alertCombiner = Just $ dataCombiner $ const id
|
||||
, alertName = Just $ PairAlert repo
|
||||
, alertCombiner = Just $ dataCombiner $ \_old new -> new
|
||||
, alertButton = Just button
|
||||
}
|
||||
|
||||
pairRequestAcknowledgedAlert :: String -> AlertButton -> Alert
|
||||
pairRequestAcknowledgedAlert repo button = baseActivityAlert
|
||||
{ alertData = ["Pair request with", UnTensed (T.pack repo), Tensed "in progress" "complete"]
|
||||
, alertPriority = High
|
||||
, alertName = Just $ PairAlert repo
|
||||
, alertCombiner = Just $ dataCombiner $ \_old new -> new
|
||||
, alertButton = Just button
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue