mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-31 11:30:39 +00:00
Refactor Manager to always have a valid SignalAccount instance
Extract ProvisioningManager to link new devices
This commit is contained in:
parent
8163a42d3a
commit
a02031aa80
8 changed files with 239 additions and 149 deletions
34
src/main/java/org/asamk/signal/manager/PathConfig.java
Normal file
34
src/main/java/org/asamk/signal/manager/PathConfig.java
Normal file
|
@ -0,0 +1,34 @@
|
|||
package org.asamk.signal.manager;
|
||||
|
||||
public class PathConfig {
|
||||
|
||||
private final String dataPath;
|
||||
private final String attachmentsPath;
|
||||
private final String avatarsPath;
|
||||
|
||||
public static PathConfig createDefault(final String settingsPath) {
|
||||
return new PathConfig(
|
||||
settingsPath + "/data",
|
||||
settingsPath + "/attachments",
|
||||
settingsPath + "/avatars"
|
||||
);
|
||||
}
|
||||
|
||||
private PathConfig(final String dataPath, final String attachmentsPath, final String avatarsPath) {
|
||||
this.dataPath = dataPath;
|
||||
this.attachmentsPath = attachmentsPath;
|
||||
this.avatarsPath = avatarsPath;
|
||||
}
|
||||
|
||||
public String getDataPath() {
|
||||
return dataPath;
|
||||
}
|
||||
|
||||
public String getAttachmentsPath() {
|
||||
return attachmentsPath;
|
||||
}
|
||||
|
||||
public String getAvatarsPath() {
|
||||
return avatarsPath;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue