mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-11-07 19:31:45 +01:00
Fixed data combining for Extension tabs
- All aggregate data now displayed properly
This commit is contained in:
parent
0ea9389a9b
commit
cb6c8affa3
@ -113,6 +113,22 @@ public class ExtensionTabData implements Comparable<ExtensionTabData> {
|
|||||||
this.stringData.putAll(other.stringData);
|
this.stringData.putAll(other.stringData);
|
||||||
|
|
||||||
this.tableData.addAll(other.tableData);
|
this.tableData.addAll(other.tableData);
|
||||||
|
|
||||||
|
createOrderingList();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void createOrderingList() {
|
||||||
|
List<ExtensionDescriptive> descriptives = new ArrayList<>();
|
||||||
|
booleanData.values().stream().map(ExtensionData::getDescriptive).forEach(descriptives::add);
|
||||||
|
doubleData.values().stream().map(ExtensionData::getDescriptive).forEach(descriptives::add);
|
||||||
|
percentageData.values().stream().map(ExtensionData::getDescriptive).forEach(descriptives::add);
|
||||||
|
numberData.values().stream().map(ExtensionData::getDescriptive).forEach(descriptives::add);
|
||||||
|
stringData.values().stream().map(ExtensionData::getDescriptive).forEach(descriptives::add);
|
||||||
|
|
||||||
|
order = descriptives.stream().sorted()
|
||||||
|
.map(ExtensionDescriptive::getName)
|
||||||
|
.distinct()// Method names are usually different, but in case someone had same method name with different parameters.
|
||||||
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class Factory {
|
public static class Factory {
|
||||||
@ -153,22 +169,8 @@ public class ExtensionTabData implements Comparable<ExtensionTabData> {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createOrderingList() {
|
|
||||||
List<ExtensionDescriptive> descriptives = new ArrayList<>();
|
|
||||||
data.booleanData.values().stream().map(ExtensionData::getDescriptive).forEach(descriptives::add);
|
|
||||||
data.doubleData.values().stream().map(ExtensionData::getDescriptive).forEach(descriptives::add);
|
|
||||||
data.percentageData.values().stream().map(ExtensionData::getDescriptive).forEach(descriptives::add);
|
|
||||||
data.numberData.values().stream().map(ExtensionData::getDescriptive).forEach(descriptives::add);
|
|
||||||
data.stringData.values().stream().map(ExtensionData::getDescriptive).forEach(descriptives::add);
|
|
||||||
|
|
||||||
data.order = descriptives.stream().sorted()
|
|
||||||
.map(ExtensionDescriptive::getName)
|
|
||||||
.distinct()// Method names are usually different, but in case someone had same method name with different parameters.
|
|
||||||
.collect(Collectors.toList());
|
|
||||||
}
|
|
||||||
|
|
||||||
public ExtensionTabData build() {
|
public ExtensionTabData build() {
|
||||||
createOrderingList();
|
data.createOrderingList();
|
||||||
Collections.sort(data.tableData);
|
Collections.sort(data.tableData);
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ dependencies {
|
|||||||
compile project(path: ":api")
|
compile project(path: ":api")
|
||||||
compile "com.djrapitops:Extension-AdvancedAchievements:1.1-R0.2"
|
compile "com.djrapitops:Extension-AdvancedAchievements:1.1-R0.2"
|
||||||
compile "com.djrapitops:Extension-AdvancedBan:2.1.5-R0.5"
|
compile "com.djrapitops:Extension-AdvancedBan:2.1.5-R0.5"
|
||||||
compile "com.djrapitops:Extension-ASkyBlock:3.0.9.4-R0.1"
|
compile "com.djrapitops:Extension-ASkyBlock:3.0.9.4-R0.2"
|
||||||
compile "com.djrapitops:Extension-BanManager:5.15.0-R0.4"
|
compile "com.djrapitops:Extension-BanManager:5.15.0-R0.4"
|
||||||
compile "com.djrapitops:Extension-CoreProtect:2.16.0-R0.2"
|
compile "com.djrapitops:Extension-CoreProtect:2.16.0-R0.2"
|
||||||
compile "com.djrapitops:Extension-DiscordSRV:1.16.6-R0.2"
|
compile "com.djrapitops:Extension-DiscordSRV:1.16.6-R0.2"
|
||||||
|
Loading…
Reference in New Issue
Block a user