chore(cleanup): remove dead code and add android build to gitignore

This commit is contained in:
plebeius
2026-02-24 15:15:38 +08:00
parent b5d9db8a66
commit 5bd1dc0e71
11 changed files with 8 additions and 275 deletions
-14
View File
@@ -29,17 +29,3 @@ export interface ProviderAttempt {
/** Selectors tried (e.g. when file input / submit not found); from plugin or parsed from error */
matchedSelectors?: string[];
}
/** Successful upload result */
export interface ProviderSuccess {
provider: ProviderId;
url: string;
fileName: string;
attempts?: ProviderAttempt[];
}
/** Aggregate error when all providers fail */
export interface ProviderAggregateError {
attempts: ProviderAttempt[];
message: string;
}
-4
View File
@@ -7,10 +7,6 @@ interface SnowOptions {
// Add this new variable to track manual override
let manualSnowOverride: boolean | null = null;
export const setManualSnowOverride = (value: boolean): void => {
manualSnowOverride = value;
};
export const initSnow = ({ flakeCount }: SnowOptions): void => {
const randomRange = (min: number, max: number): number => {
min = Math.ceil(min);
-31
View File
@@ -1,31 +0,0 @@
import {
isAllView,
isBoardView,
isCatalogView,
isHomeView,
isModView,
isModQueueView,
isPendingPostView,
isPostPageView,
isSettingsView,
isSubscriptionsView,
isNotFoundView,
ParamsType,
} from './view-utils';
import { formatUserIDForDisplay } from './string-utils';
export {
isAllView,
isBoardView,
isCatalogView,
isHomeView,
isModView,
isModQueueView,
isPendingPostView,
isPostPageView,
isSettingsView,
isSubscriptionsView,
isNotFoundView,
formatUserIDForDisplay,
};
export type { ParamsType };
+4 -4
View File
@@ -20,7 +20,7 @@ let cachedAddressToDirectoryMap: Map<string, string> | null = null;
* Create a map from directory codes to community addresses
* Uses caching to avoid recreating the map when communities array hasn't changed
*/
export const getDirectoryToAddressMap = (communities: DirectoryCommunity[]): Map<string, string> => {
const getDirectoryToAddressMap = (communities: DirectoryCommunity[]): Map<string, string> => {
// Check if we can use cached map (same array reference)
if (cachedDirectoryToAddressMap && cachedCommunitiesForDirectory === communities) {
return cachedDirectoryToAddressMap;
@@ -46,7 +46,7 @@ export const getDirectoryToAddressMap = (communities: DirectoryCommunity[]): Map
* Create a map from community addresses to directory codes
* Uses caching to avoid recreating the map when communities array hasn't changed
*/
export const getAddressToDirectoryMap = (communities: DirectoryCommunity[]): Map<string, string> => {
const getAddressToDirectoryMap = (communities: DirectoryCommunity[]): Map<string, string> => {
// Check if we can use cached map (same array reference)
if (cachedAddressToDirectoryMap && cachedCommunitiesForAddress === communities) {
return cachedAddressToDirectoryMap;
@@ -139,9 +139,9 @@ export const isModQueueRoute = (pathname: string): boolean => {
};
/** Page numbers 110 for board feed pagination */
export const BOARD_PAGE_REGEX = /^([1-9]|10)$/;
const BOARD_PAGE_REGEX = /^([1-9]|10)$/;
export const isBoardFeedPageNumber = (segment: string): boolean => BOARD_PAGE_REGEX.test(segment);
const isBoardFeedPageNumber = (segment: string): boolean => BOARD_PAGE_REGEX.test(segment);
/** Internal: check if segment is a multiboard root (all, subs, mod) */
function isMultiboardRoot(segment: string): boolean {