Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enh #221: By default, enabled Mobile notification types for those ena… #258

Merged
merged 2 commits into from
Sep 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changelog
=========

1.8.6 (Unreleased)
----------------------
- Enh #258: By default, enabled "Mobile" notification types for those enabled for "Web"

1.8.5 (March 14, 2024)
----------------------
- Fix #249: Fix replaced method `friendship\Module::isEnabled()`
Expand Down
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Tasks",
"description": "Intuitive task management tool with many basic and advanced features.",
"keywords": ["task", "todo"],
"version": "1.8.5",
"version": "1.8.6",
"homepage": "https://github.com/humhub/tasks",
"humhub": {
"minVersion": "1.14"
Expand Down
21 changes: 1 addition & 20 deletions notifications/TaskNotificationCategory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@

namespace humhub\modules\tasks\notifications;

use Yii;
use humhub\modules\notification\components\NotificationCategory;
use humhub\modules\notification\targets\BaseTarget;
use humhub\modules\notification\targets\MailTarget;
use humhub\modules\notification\targets\WebTarget;
use humhub\modules\notification\targets\MobileTarget;
use Yii;

/**
* SpaceMemberNotificationCategory
Expand Down Expand Up @@ -44,19 +40,4 @@ public function getDescription()
{
return Yii::t('TasksModule.base', 'Receive Notifications for Tasks (Deadline Updates, Status changes ...).');
}

/**
* @inheritdoc
*/
public function getDefaultSetting(BaseTarget $target)
{
if($target instanceof WebTarget || $target instanceof MailTarget) {
return true;
} else if ($target instanceof MobileTarget) {
return false;
}

return $target->defaultSetting;
}

}
23 changes: 1 addition & 22 deletions notifications/TaskReminderCategory.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@

namespace humhub\modules\tasks\notifications;

use Yii;
use humhub\modules\notification\components\NotificationCategory;
use humhub\modules\notification\targets\BaseTarget;
use humhub\modules\notification\targets\MailTarget;
use humhub\modules\notification\targets\WebTarget;
use humhub\modules\notification\targets\MobileTarget;
use Yii;

/**
* SpaceMemberNotificationCategory
Expand Down Expand Up @@ -44,21 +40,4 @@ public function getDescription()
{
return Yii::t('TasksModule.base', 'Receive Notifications for Task Reminder.');
}

/**
* @inheritdoc
*/
public function getDefaultSetting(BaseTarget $target)
{
if ($target->id === MailTarget::getId()) {
return true;
} else if ($target->id === WebTarget::getId()) {
return true;
} else if ($target->id === MobileTarget::getId()) {
return true;
}

return $target->defaultSetting;
}

}