-
-
Notifications
You must be signed in to change notification settings - Fork 494
feat: General enhancements for views #3093
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
base: master
Are you sure you want to change the base?
Changes from 127 commits
c68ede8
f757ac0
56b5b46
ec0ddfa
deeed74
c085789
130fab8
45da8fe
aadf0ed
3289505
d984274
97db5d4
3775262
a5d076c
22aaeb1
d06f364
6906ae5
d993efe
3fc8b2a
cb403d2
7d65cf4
5bfee91
d16f857
8f048e1
1074d51
91390cb
2f48c7b
ea33a62
2ba67c3
3c49f09
738b6ee
1ae6835
eb9fa92
2488e63
5ebdeaa
050f639
d831318
6eb6086
6496c4c
de61d8e
718fe73
bc785f4
66a4db6
de42bb6
c4000cb
2f3da73
c7a3983
5e02950
572fe5a
d9b9c1f
a054102
9adf32d
2728982
534f743
7cf34bd
9db2632
d6e287d
eba1d9e
4dccef7
6e5507a
01e95f8
0678073
2a4e4d5
71a0e81
99ecd2c
23b7743
fb2e439
23be55b
7c69fb0
12caf98
4b71a77
5d8609c
f12147d
db9a63c
66054a0
a985986
2fb1ac5
d46f6e8
6d30016
065e1a1
68e8252
4c89957
c222ded
774deea
8dfd1dc
d44dbf7
e7399fc
33c2b4a
d4f4da7
2d43d5a
ea7aa0e
d414afc
1e14564
ee76172
411dabe
836d3b0
6c67038
6bf58d1
0133164
6b23025
b83dc4c
37ff1d7
88c9edd
83d621c
3a29103
5ba58c3
c2b0286
f86e96e
8c8346a
c81235b
ccbfa90
b9f0db7
754894a
7a34cea
f95ded9
2ffe35f
094f6b0
377e536
98917bd
75f7a39
44e9611
29573a6
c16fd6f
2542ad5
5dd5ec3
abc3468
27a15b5
edda650
e3a0dc7
79252f4
569941e
5d15471
d84a117
521e60e
6c3f8df
cae8c7a
11635d8
d36f6e2
aa3be7d
04bd81d
c4a127b
ec5b645
9a91538
cf57dc9
21d6748
9974002
3b64337
67773c3
c128d4e
025ec6d
5a63bcf
e1e8ae3
19108ce
3aabd40
df51381
ed9feb3
deb9252
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -27,6 +27,8 @@ | |
| import contextlib | ||
| from typing import List | ||
|
|
||
| from typing_extensions import Self | ||
|
|
||
| import discord | ||
| from discord.errors import DiscordException | ||
| from discord.ext.bridge import BridgeContext | ||
|
|
@@ -916,6 +918,12 @@ def update_custom_view(self, custom_view: discord.ui.View): | |
| for item in custom_view.children: | ||
| self.add_item(item) | ||
|
|
||
| def clear_items(self) -> Self: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So not sure this is necessary after my other fix but doesn't hurt to keep it in tbh.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if there have been no issues with your fix, it may be better for me to revert this
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Up to you to decide what is better. I'll double check that the issue is still fixed too later |
||
| # Necessary override due to behavior of Item.parent, see #3057 | ||
| self.children.clear() | ||
| self._View__weights.clear() | ||
| return self | ||
|
|
||
| def get_page_group_content(self, page_group: PageGroup) -> list[Page]: | ||
| """Returns a converted list of `Page` objects for the given page group based on the content of its pages.""" | ||
| return [self.get_page_content(page) for page in page_group.pages] | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.