mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-10 11:13:48 +02:00
Clean up model fetching and loading states
This commit is contained in:
@@ -1,10 +1,4 @@
|
||||
import type {
|
||||
AnyModel,
|
||||
Cookie,
|
||||
GrpcConnection,
|
||||
HttpResponse,
|
||||
HttpResponseHeader,
|
||||
} from '@yaakapp-internal/models';
|
||||
import type { AnyModel, Cookie, HttpResponseHeader } from '@yaakapp-internal/models';
|
||||
import { getMimeTypeFromContentType } from './contentType';
|
||||
|
||||
export const BODY_TYPE_NONE = null;
|
||||
@@ -29,13 +23,6 @@ export function cookieDomain(cookie: Cookie): string {
|
||||
return 'unknown';
|
||||
}
|
||||
|
||||
export function isResponseLoading(
|
||||
response: Pick<HttpResponse | GrpcConnection, 'state'> | null,
|
||||
): boolean {
|
||||
if (response == null) return false;
|
||||
return response.state !== 'closed';
|
||||
}
|
||||
|
||||
export function modelsEq(a: AnyModel, b: AnyModel) {
|
||||
if (a.model != b.model) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user