Add "flat" front history view (percentages add up to 100%)
This commit is contained in:
		@@ -523,8 +523,9 @@ namespace PluralKit.Bot
 | 
			
		||||
                title.Append($"`{targetSystem.Hid}`");
 | 
			
		||||
 | 
			
		||||
            var ignoreNoFronters = ctx.MatchFlag("fo", "fronters-only");
 | 
			
		||||
            var showFlat = ctx.MatchFlag("flat");
 | 
			
		||||
            var frontpercent = await _db.Execute(c => _repo.GetFrontBreakdown(c, targetSystem.Id, target.Id, rangeStart.Value.ToInstant(), now));
 | 
			
		||||
            await ctx.Reply(embed: await _embeds.CreateFrontPercentEmbed(frontpercent, targetSystem, target, targetSystem.Zone, ctx.LookupContextFor(targetSystem), title.ToString(), ignoreNoFronters));
 | 
			
		||||
            await ctx.Reply(embed: await _embeds.CreateFrontPercentEmbed(frontpercent, targetSystem, target, targetSystem.Zone, ctx.LookupContextFor(targetSystem), title.ToString(), ignoreNoFronters, showFlat));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private async Task<PKSystem> GetGroupSystem(Context ctx, PKGroup target, IPKConnection conn)
 | 
			
		||||
 
 | 
			
		||||
@@ -135,8 +135,9 @@ namespace PluralKit.Bot
 | 
			
		||||
                title.Append($"`{system.Hid}`");
 | 
			
		||||
 | 
			
		||||
            var ignoreNoFronters = ctx.MatchFlag("fo", "fronters-only");
 | 
			
		||||
            var showFlat = ctx.MatchFlag("flat");
 | 
			
		||||
            var frontpercent = await _db.Execute(c => _repo.GetFrontBreakdown(c, system.Id, null, rangeStart.Value.ToInstant(), now));
 | 
			
		||||
            await ctx.Reply(embed: await _embeds.CreateFrontPercentEmbed(frontpercent, system, null, system.Zone, ctx.LookupContextFor(system), title.ToString(), ignoreNoFronters));
 | 
			
		||||
            await ctx.Reply(embed: await _embeds.CreateFrontPercentEmbed(frontpercent, system, null, system.Zone, ctx.LookupContextFor(system), title.ToString(), ignoreNoFronters, showFlat));
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user