Skip to content

Commit

Permalink
Use default settings extender (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
imorland authored Aug 4, 2022
1 parent c86f5ce commit 901acbe
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}
],
"require": {
"flarum/core": "^1.3.0"
"flarum/core": "^1.3.1"
},
"authors": [
{
Expand Down
3 changes: 2 additions & 1 deletion extend.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
}),

(new Extend\Settings())
->serializeToForum('fof-merge-discussions.search_limit', 'fof-merge-discussions.search_limit', 'intVal', 4),
->default('fof-merge-discussions.search_limit', 4)
->serializeToForum('fof-merge-discussions.search_limit', 'fof-merge-discussions.search_limit', 'intVal'),

(new Extend\View())
->namespace('fof-merge-discussions', __DIR__.'/resources/views'),
Expand Down
1 change: 0 additions & 1 deletion js/src/admin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ app.initializers.add('fof/merge-discussions', () => {
label: app.translator.trans('fof-merge-discussions.admin.settings.search_result_label'),
type: 'number',
setting: 'fof-merge-discussions.search_limit',
placeholder: '4',
help: app.translator.trans('fof-merge-discussions.admin.settings.search_result_help'),
min: 1,
max: 99,
Expand Down
2 changes: 1 addition & 1 deletion resources/locale/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ fof-merge-discussions:
permissions:
merge_discussions_label: Merge discussions
settings:
search_result_help: How many discussions should be returned when searching within the `Merge Discussions` modal. Default is 4
search_result_help: How many discussions should be returned when searching within the `Merge Discussions` modal.
search_result_label: Merge Discussion Search Limit

api:
Expand Down

0 comments on commit 901acbe

Please sign in to comment.