Skip to content

Commit

Permalink
3.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Rello committed Aug 19, 2021
1 parent a0df88c commit 3208999
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
19 changes: 12 additions & 7 deletions js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1085,13 +1085,18 @@ OCA.Audioplayer.Backend = {
});
},

whatsnewDismiss: function dismiss(version) {
let data = {version: encodeURIComponent(version)};
let xhr = new XMLHttpRequest();
xhr.open('POST', OC.generateUrl('apps/audioplayer/whatsnew'));
xhr.setRequestHeader('requesttoken', OC.requestToken);
xhr.setRequestHeader('OCS-APIREQUEST', 'true');
xhr.send(JSON.stringify(data));
whatsnewDismiss: function (version) {
//let data = {version: encodeURIComponent(version)};
//let xhr = new XMLHttpRequest();
//xhr.open('POST', OC.generateUrl('apps/audioplayer/whatsnew'));
//xhr.setRequestHeader('requesttoken', OC.requestToken);
//xhr.setRequestHeader('OCS-APIREQUEST', 'true');
//xhr.send(JSON.stringify(data));
$.ajax({
type: 'POST',
url: OC.generateUrl('apps/audioplayer/whatsnew'),
data: {version: encodeURIComponent(version)}
})

let elem = document.querySelector('.whatsNewPopover');
elem.parentNode.removeChild(elem);
Expand Down
8 changes: 4 additions & 4 deletions lib/Controller/WhatsNewController.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ public function get(): DataResponse
$iterator = $this->langFactory->getLanguageIterator();
$whatsNew = $this->whatsNewService->getChangesForVersion($currentVersion);

$this->logger->debug(json_encode($whatsNew));

$resultData = [
'changelogURL' => $whatsNew['changelogURL'],
'product' => 'Audioplayer',
Expand All @@ -101,10 +99,12 @@ public function get(): DataResponse
/**
* @NoAdminRequired
*
* @throws \OCP\PreConditionNotMetException
* @param string $version
* @return DataResponse
* @throws DoesNotExistException
* @throws \OCP\PreConditionNotMetException
*/
public function dismiss(string $version): DataResponse
public function dismiss($version)
{
$user = $this->userSession->getUser();
if ($user === null) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Migration/Version3002Date20210019213332.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function postSchemaChange(IOutput $output, Closure $schemaClosure, array
$query = $this->connection->getQueryBuilder();
$query->insert('audioplayer_whats_new')
->values([
'version' => $query->createNamedParameter('2.11.0'),
'version' => $query->createNamedParameter('3.2.0'),
'data' => $query->createNamedParameter('{"changelogURL":"https:\/\/github.com\/rello\/audioplayer\/blob\/master\/CHANGELOG.md","whatsNew":{
"en":{"regular":["Collaborative tags support","Dashboard widget"],"admin":["New Features apply to users"]},
"de":{"regular":["Collaborative tags support","Dashboard widget"],"admin":["Nur User Features"]}
Expand Down
4 changes: 0 additions & 4 deletions lib/WhatsNew/WhatsNewCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@ protected function evaluateResponse(IResponse $response): int
} elseif ($response->getStatusCode() === 200) {
return self::RESPONSE_HAS_CONTENT;
}
$this->logger->debug('Unexpected return code {code} from changelog server', [
'app' => 'core',
'code' => $response->getStatusCode(),
]);
return self::RESPONSE_NO_CONTENT;
}

Expand Down

0 comments on commit 3208999

Please sign in to comment.