## Summary Relative includes can hide inappropriate dependency relationships. In this case, I found that lib/KOReaderSync/KOReaderCredentialStore.cpp was dependent on src/JsonSettingsIO.h -- a lib -> app dependency, the opposite direction dependencies should flow in this project. This change replaces all relative includes with root-relative includes, and corrects the KOReaderCredentialStore dependency by moving its JSON settings serialization local to the KOReaderSync library. --- ### AI Usage While CrossPoint doesn't have restrictions on AI tools in contributing, please be transparent about their usage as it helps set the right context for reviewers. Did you use AI tools to help write this code? _**PARTIALLY**_
29 lines
772 B
C++
29 lines
772 B
C++
#pragma once
|
|
|
|
#include <Epub/FootnoteEntry.h>
|
|
|
|
#include <cstring>
|
|
#include <functional>
|
|
#include <vector>
|
|
|
|
#include "activities/Activity.h"
|
|
#include "util/ButtonNavigator.h"
|
|
|
|
class EpubReaderFootnotesActivity final : public Activity {
|
|
public:
|
|
explicit EpubReaderFootnotesActivity(GfxRenderer& renderer, MappedInputManager& mappedInput,
|
|
const std::vector<FootnoteEntry>& footnotes)
|
|
: Activity("EpubReaderFootnotes", renderer, mappedInput), footnotes(footnotes) {}
|
|
|
|
void onEnter() override;
|
|
void onExit() override;
|
|
void loop() override;
|
|
void render(RenderLock&&) override;
|
|
|
|
private:
|
|
const std::vector<FootnoteEntry>& footnotes;
|
|
int selectedIndex = 0;
|
|
int scrollOffset = 0;
|
|
ButtonNavigator buttonNavigator;
|
|
};
|