Fixed broken pray button

This commit is contained in:
Daniel J. Summers 2019-07-07 07:08:42 -05:00
parent 42615dae82
commit 57cd17c734
3 changed files with 6 additions and 4 deletions

View File

@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<Version>1.2.0.0</Version>
<Version>1.2.1.0</Version>
</PropertyGroup>
<ItemGroup>

View File

@ -1,6 +1,6 @@
{
"name": "my-prayer-journal",
"version": "1.2.0",
"version": "1.2.1",
"description": "myPrayerJournal - Front End",
"author": "Daniel J. Summers <daniel@bitbadger.solutions>",
"private": true,

View File

@ -104,9 +104,11 @@ export default new Vuex.Store({
progress.start()
try {
let oldReq = (state.journal.filter(req => req.requestId === requestId) || [])[0] || {}
if (!(status === 'Prayed' && updateText === '')) {
if (status !== 'Answered' && (oldReq.recurType !== recurType || oldReq.recurCount !== recurCount)) {
await api.updateRecurrence(requestId, recurType, recurCount)
}
}
if (status !== 'Updated' || oldReq.text !== updateText) {
await api.updateRequest(requestId, status, oldReq.text !== updateText ? updateText : '')
}