mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-10-02 00:40:51 +00:00
80157fc1be
This commit refactors the way `InfoItemDialog`s are generated. This is necessary because the old way used the `StreamDialogEntry` enum for most of the dialogs' content generation process. This required static variables and methods to store the entries which are used for the dialog to be build (See e.g.`enabledEntries` and methods like `generateCommands()`). In other words, `StreamDialogEntry` wasn't an enumeration anymore. To address this issue, a `Builder` is introduced for the `InfoItemDialog`'s genration. The builder also comes with some default entries and and a specific order. Both can be used, but are not enforced. A second problem that introduced a structure which was atypical for an enumeration was the usage of non-final attributes within `StreamDialogEntry` instances. These were needed, because the default actions needed to overriden in some cases. To address this problem, the `StreamDialogEntry` enumeration was renamed to `StreamDialogDefaultEntry` and a new `StreamDialogEntry` class is used instead. |
||
---|---|---|
.. | ||
about | ||
database | ||
download | ||
error | ||
fragments | ||
info_list | ||
ktx | ||
local | ||
player | ||
settings | ||
streams | ||
util | ||
views | ||
App.java | ||
BaseFragment.java | ||
CheckForNewAppVersion.java | ||
DownloaderImpl.java | ||
ExitActivity.java | ||
MainActivity.java | ||
NewPipeDatabase.java | ||
NewVersionManager.kt | ||
PanicResponderActivity.java | ||
QueueItemMenuUtil.java | ||
RouterActivity.java |